Encryptor has static constants and utility methods for encryption, such as encryptData. More...
#include <encryptor.hpp>
Static Public Member Functions | |
| static void | encryptData (Data &data, const Blob &payload, const Name &keyName, const Blob &key, const EncryptParams ¶ms) |
| Prepare an encrypted data packet by encrypting the payload using the key according to the params. More... | |
| static const Name::Component & | getNAME_COMPONENT_FOR () |
| static const Name::Component & | getNAME_COMPONENT_READ () |
| static const Name::Component & | getNAME_COMPONENT_SAMPLE () |
| static const Name::Component & | getNAME_COMPONENT_ACCESS () |
| static const Name::Component & | getNAME_COMPONENT_E_KEY () |
| static const Name::Component & | getNAME_COMPONENT_D_KEY () |
| static const Name::Component & | getNAME_COMPONENT_C_KEY () |
Encryptor has static constants and utility methods for encryption, such as encryptData.
|
static |
Prepare an encrypted data packet by encrypting the payload using the key according to the params.
In addition, this prepares the encoded EncryptedContent with the encryption result using keyName and params. The encoding is set as the content of the data packet. If params defines an asymmetric encryption algorithm and the payload is larger than the maximum plaintext size, this encrypts the payload with a symmetric key that is asymmetrically encrypted and provided as a nonce in the content of the data packet. The packet's /{dataName}/ is updated to be /{dataName}/FOR/{keyName}
| data | The data packet which is updated. |
| payload | The payload to encrypt. |
| keyName | The key name for the EncryptedContent. |
| key | The encryption key value. |
| params | The parameters for encryption. |
1.8.6