A class representing private and public keys.
More...
#include <AsyncSslKeypair.h>
A class representing private and public keys.
- Author
- Tobias Blomberg / SM0SVX
- Date
- 2024-07-11
- Examples
- AsyncDigest_demo.cpp, and AsyncSslX509_demo.cpp.
Definition at line 123 of file AsyncSslKeypair.h.
◆ SslKeypair() [1/4]
Async::SslKeypair::SslKeypair |
( |
void | | ) |
|
|
inline |
◆ SslKeypair() [2/4]
Async::SslKeypair::SslKeypair |
( |
EVP_PKEY * | pkey | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
pkey | A pointer to an existing EVP_PKEY object |
Definition at line 135 of file AsyncSslKeypair.h.
◆ SslKeypair() [3/4]
Async::SslKeypair::SslKeypair |
( |
SslKeypair && | other | ) |
|
|
inline |
Move constructor.
- Parameters
-
other | The object to move from |
Definition at line 144 of file AsyncSslKeypair.h.
◆ SslKeypair() [4/4]
Async::SslKeypair::SslKeypair |
( |
SslKeypair & | other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
other | The other object to copy |
Definition at line 154 of file AsyncSslKeypair.h.
◆ ~SslKeypair()
Async::SslKeypair::~SslKeypair |
( |
void | | ) |
|
|
inline |
◆ generate()
bool Async::SslKeypair::generate |
( |
unsigned int | bits | ) |
|
|
inline |
◆ isNull()
bool Async::SslKeypair::isNull |
( |
void | | ) |
const |
|
inline |
◆ newRawPrivateKey()
template<class T >
bool Async::SslKeypair::newRawPrivateKey |
( |
int | type, |
|
|
const T & | key ) |
|
inline |
Generate a key using the given algorithm and raw key data.
- Parameters
-
type | The algorithm to use |
key | The raw key data |
- Returns
- Returns true on success
To fully understand what this function do, read the documentation for the OpenSSL function EVP_PKEY_new_raw_private_key.
Ex: newRawPrivateKey(EVP_PKEY_HMAC, key);
Definition at line 264 of file AsyncSslKeypair.h.
◆ operator const EVP_PKEY *()
Async::SslKeypair::operator const EVP_PKEY * |
( |
void | | ) |
const |
|
inline |
◆ operator EVP_PKEY *()
Async::SslKeypair::operator EVP_PKEY * |
( |
void | | ) |
|
|
inline |
Cast to pointer to EVP_PKEY.
- Returns
- Returns a pointer to the internal EVP_PKEY object
Definition at line 439 of file AsyncSslKeypair.h.
◆ operator!=()
bool Async::SslKeypair::operator!= |
( |
const SslKeypair & | other | ) |
const |
|
inline |
Check if two keys is not equal to each other.
- Parameters
-
other | The other key to use in the comparison |
- Returns
- Returns true if the keys are not the same
Definition at line 447 of file AsyncSslKeypair.h.
◆ operator=()
Copy assignment operator.
- Parameters
-
other | The object to copy from |
- Returns
- Returns a reference to this object
Definition at line 165 of file AsyncSslKeypair.h.
◆ privateKeyFromPem()
bool Async::SslKeypair::privateKeyFromPem |
( |
const std::string & | pem | ) |
|
|
inline |
◆ privateKeyPem()
std::string Async::SslKeypair::privateKeyPem |
( |
void | | ) |
const |
|
inline |
◆ publicKeyFromPem()
bool Async::SslKeypair::publicKeyFromPem |
( |
const std::string & | pem | ) |
|
|
inline |
◆ publicKeyPem()
std::string Async::SslKeypair::publicKeyPem |
( |
void | | ) |
const |
|
inline |
◆ readPrivateKeyFile()
bool Async::SslKeypair::readPrivateKeyFile |
( |
const std::string & | filename | ) |
|
|
inline |
Read key data from PEM file.
- Parameters
-
filename | The path to the file to read PEM data from |
- Returns
- Returns true on success
Definition at line 368 of file AsyncSslKeypair.h.
◆ writePrivateKeyFile()
bool Async::SslKeypair::writePrivateKeyFile |
( |
const std::string & | filename | ) |
|
|
inline |
The documentation for this class was generated from the following file: