dht::crypto::PublicKey Struct Reference

`#include <crypto.h>`

## Public Member Functions

| PublicKey (gnutls_pubkey_t k)
| PublicKey (const Blob &pk)
| PublicKey (PublicKey &&o) noexcept
| operator bool () const
bool | operator== (const PublicKey &o) const
bool | operator!= (const PublicKey &o) const
PublicKey & | operator= (PublicKey &&o) noexcept
InfoHash | getId () const
PkId | getLongId () const
bool | checkSignature (const Blob &data, const Blob &signature) const
Blob | encrypt (const Blob &) const
void | pack (Blob &b) const
void | unpack (const uint8_t *dat, size_t dat_size)
std::string | toString () const
template<typename Packer >
void | msgpack_pack (Packer &p) const
void | msgpack_unpack (msgpack::object o)

## Public Attributes

gnutls_pubkey_t | pk {}

## Detailed Description

A public key.

Definition at line 67 of file crypto.h.

## Constructor & Destructor Documentation

## PublicKey() [1/3]

dht::crypto::PublicKey::PublicKey | ( |  | ) |

inline

Definition at line 69 of file crypto.h.

## PublicKey() [2/3]

dht::crypto::PublicKey::PublicKey | ( | gnutls_pubkey_t | k | ) |

inline

Takes ownership of an existing gnutls_pubkey.

Definition at line 74 of file crypto.h.

## PublicKey() [3/3]

dht::crypto::PublicKey::PublicKey | ( | PublicKey && | o | ) |

inline noexcept

Definition at line 76 of file crypto.h.

## Member Function Documentation

## msgpack_pack()

template<typename Packer >

void dht::crypto::PublicKey::msgpack_pack | ( | Packer & | p | ) | const

inline

Definition at line 100 of file crypto.h.

## operator bool()

dht::crypto::PublicKey::operator bool | ( |  | ) | const

inline explicit

Definition at line 79 of file crypto.h.

## operator!=()

bool dht::crypto::PublicKey::operator!= | ( | const PublicKey & | o | ) | const

inline

Definition at line 83 of file crypto.h.

## operator==()

bool dht::crypto::PublicKey::operator== | ( | const PublicKey & | o | ) | const

inline

Definition at line 80 of file crypto.h.

## Member Data Documentation

## pk

gnutls_pubkey_t dht::crypto::PublicKey::pk {}

Definition at line 110 of file crypto.h.

The documentation for this struct was generated from the following file:

- /tmp/slackbuilds_libs/opendht-1.7.4/include/opendht/crypto.h