|
My Project
1.8.1
C++ Distributed Hash Table
|
#include <crypto.h>
Public Member Functions | |
| PrivateKey (gnutls_x509_privkey_t k) | |
| PrivateKey (PrivateKey &&o) noexcept | |
| PrivateKey & | operator= (PrivateKey &&o) noexcept |
| PrivateKey (const Blob &import, const std::string &password={}) | |
| operator bool () const | |
| PublicKey | getPublicKey () const |
| Blob | serialize (const std::string &password={}) const |
| Blob | sign (const Blob &) const |
| Blob | decrypt (const Blob &cypher) const |
Static Public Member Functions | |
| static PrivateKey | generate (unsigned key_length=4096) |
| static PrivateKey | generateEC () |
Public Attributes | |
| gnutls_privkey_t | key {} |
| gnutls_x509_privkey_t | x509_key {} |
| dht::crypto::PrivateKey::PrivateKey | ( | gnutls_x509_privkey_t | k | ) |
Takes ownership of an existing gnutls_x509_privkey.
Try to decrypt the provided cypher text. In case of failure a CryptoException is thrown.
|
static |
Generate a new RSA key pair
| key_length | : size of the modulus in bits Minimim value: 2048 Recommended values: 4096, 8192 |
Sign the provided binary object.