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

The AesAlgorithm class provides static methods to manipulate keys, encrypt and decrypt using the AES symmetric key cipher. More...

#include <aes-algorithm.hpp>

Static Public Member Functions

static DecryptKey generateKey (const AesKeyParams &params)
 Generate a new random decrypt key for AES based on the given params. More...
 
static EncryptKey deriveEncryptKey (const Blob &keyBits)
 Derive a new encrypt key from the given decrypt key value. More...
 
static Blob decrypt (const Blob &keyBits, const Blob &encryptedData, const EncryptParams &params)
 Decrypt the encryptedData using the keyBits according the encrypt params. More...
 
static Blob encrypt (const Blob &keyBits, const Blob &plainData, const EncryptParams &params)
 Encrypt the plainData using the keyBits according the encrypt params. More...
 

Static Public Attributes

static size_t BLOCK_SIZE = ndn_AES_128_BLOCK_SIZE
 

Detailed Description

The AesAlgorithm class provides static methods to manipulate keys, encrypt and decrypt using the AES symmetric key cipher.

Note
This class is an experimental feature. The API may change.

Member Function Documentation

Blob ndn::AesAlgorithm::decrypt ( const Blob keyBits,
const Blob encryptedData,
const EncryptParams params 
)
static

Decrypt the encryptedData using the keyBits according the encrypt params.

Parameters
keyBitsThe key value.
encryptedDataThe data to decrypt.
paramsThis decrypts according to params.getAlgorithmType() and other params as needed such as params.getInitialVector().
Returns
The decrypted data.
static EncryptKey ndn::AesAlgorithm::deriveEncryptKey ( const Blob keyBits)
inlinestatic

Derive a new encrypt key from the given decrypt key value.

Parameters
keyBitsThe key value of the decrypt key.
Returns
The new encrypt key.
Blob ndn::AesAlgorithm::encrypt ( const Blob keyBits,
const Blob plainData,
const EncryptParams params 
)
static

Encrypt the plainData using the keyBits according the encrypt params.

Parameters
keyBitsThe key value.
plainDataThe data to encrypt.
paramsThis encrypts according to params.getAlgorithmType() and other params as needed such as params.getInitialVector().
Returns
The encrypted data.
DecryptKey ndn::AesAlgorithm::generateKey ( const AesKeyParams params)
static

Generate a new random decrypt key for AES based on the given params.

Parameters
paramsThe key params with the key size (in bits).
Returns
The new decrypt key.

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