The RsaAlgorithm class provides static methods to manipulate keys, encrypt and decrypt using RSA.
More...
#include <rsa-algorithm.hpp>
The RsaAlgorithm class provides static methods to manipulate keys, encrypt and decrypt using RSA.
- Note
- This class is an experimental feature. The API may change.
Decrypt the encryptedData using the keyBits according the encrypt params.
- Parameters
-
| keyBits | The key value (PKCS8-encoded private key). |
| encryptedData | The data to decrypt. |
| params | This decrypts according to params.getAlgorithmType(). |
- Returns
- The decrypted data.
| EncryptKey ndn::RsaAlgorithm::deriveEncryptKey |
( |
const Blob & |
keyBits | ) |
|
|
static |
Derive a new encrypt key from the given decrypt key value.
- Parameters
-
| keyBits | The key value of the decrypt key (PKCS8-encoded private key). |
- Returns
- The new encrypt key (DER-encoded public key).
Encrypt the plainData using the keyBits according the encrypt params.
- Parameters
-
| keyBits | The key value (DER-encoded public key). |
| plainData | The data to encrypt. |
| params | This encrypts according to params.getAlgorithmType(). |
- Returns
- The encrypted data.
Generate a new random decrypt key for RSA based on the given params.
- Parameters
-
| params | The key params with the key size (in bits). |
- Returns
- The new decrypt key (PKCS8-encoded private key).
The documentation for this class was generated from the following files: