Definition of a RSA key (public or private)
More...
#include <security/RSAKey.h>
Definition of a RSA key (public or private)
◆ RSAKey() [1/3]
◆ RSAKey() [2/3]
◆ RSAKey() [3/3]
RSAKey |
( |
const std::string & |
n, |
|
|
const std::string & |
e, |
|
|
const std::string & |
d |
|
) |
| |
Construct a new RSAKey with specific N, E and D (all in hex).
◆ ~ RSAKey()
◆ reflectRead()
◆ reflectWrite()
void reflectWrite |
( |
Reflector & |
r | ) |
|
|
inline |
◆ isValid()
◆ isPublicKey()
bool isPublicKey |
( |
| ) |
const |
◆ isPrivateKey()
bool isPrivateKey |
( |
| ) |
const |
◆ clear()
◆ operator=()
◆ operator==()
bool operator== |
( |
const RSAKey & |
key | ) |
|
◆ operator!=()
bool operator!= |
( |
const RSAKey & |
key | ) |
|
◆ getOpenSSLKey()
const OpenSSLRSAWrapper* getOpenSSLKey |
( |
| ) |
const |
|
inline |
Return a pointer to the OpenSSL RSA key wrapper.
◆ getNStr()
std::string getNStr |
( |
| ) |
const |
Get N as a hexadecimal number.
◆ getEStr()
std::string getEStr |
( |
| ) |
const |
Get E as a hexadecimal number.
◆ getDStr()
std::string getDStr |
( |
| ) |
const |
Get D as a hexadecimal number.
◆ generateKey()
static void generateKey |
( |
unsigned int |
iKeyBitLength, |
|
|
RSAKey & |
oPublicKey, |
|
|
RSAKey & |
oPrivateKey |
|
) |
| |
|
static |
Generate a new RSA key.
- Parameters
-
[in] | iKeyBitLength | Number of bits (must be greater than 127). |
[out] | oPublicKey | The public key. |
[out] | oPrivateKey | The private key. |
◆ feedRandomNumberGenerator()
static void feedRandomNumberGenerator |
( |
size_t |
count | ) |
|
|
static |
Feed the random number generator.
- Parameters
-
[in] | count | The number for random bytes. |
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
const RSAKey & |
key |
|
) |
| |
|
friend |
The '<<' operator for RSAKey.
Public keys: "PUBLIC:Len:HexData;"
Private keys: "PRIVATE:Len:HexData;"
◆ operator>>
std::istream& operator>> |
( |
std::istream & |
stream, |
|
|
RSAKey & |
key |
|
) |
| |
|
friend |
The documentation for this class was generated from the following file: