All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Static Public Member Functions | List of all members
ndn::Encryptor Class Reference

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 &params)
 Prepare an encrypted data packet by encrypting the payload using the key according to the params. More...
 
static const Name::ComponentgetNAME_COMPONENT_FOR ()
 
static const Name::ComponentgetNAME_COMPONENT_READ ()
 
static const Name::ComponentgetNAME_COMPONENT_SAMPLE ()
 
static const Name::ComponentgetNAME_COMPONENT_ACCESS ()
 
static const Name::ComponentgetNAME_COMPONENT_E_KEY ()
 
static const Name::ComponentgetNAME_COMPONENT_D_KEY ()
 
static const Name::ComponentgetNAME_COMPONENT_C_KEY ()
 

Detailed Description

Encryptor has static constants and utility methods for encryption, such as encryptData.

Member Function Documentation

void ndn::Encryptor::encryptData ( Data data,
const Blob payload,
const Name keyName,
const Blob key,
const EncryptParams params 
)
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}

Parameters
dataThe data packet which is updated.
payloadThe payload to encrypt.
keyNameThe key name for the EncryptedContent.
keyThe encryption key value.
paramsThe parameters for encryption.

The documentation for this class was generated from the following files: