ndn::nac::Decryptor Class Reference

NAC Decryptor. More...

#include <decryptor.hpp>

Public Types

using DecryptSuccessCallback = std::function< void(ConstBufferPtr)>
 

Public Member Functions

 Decryptor (const Key &credentialsKey, Validator &validator, KeyChain &keyChain, Face &face)
 Constructor. More...
 
 ~Decryptor ()
 
void decrypt (const Block &encryptedContent, const DecryptSuccessCallback &onSuccess, const ErrorCallback &onFailure)
 Asynchronously decrypt encryptedContent. More...
 

Detailed Description

NAC Decryptor.

Encryptor decrypts (asynchronous operation, contingent on successful retrieval of CK data, KDK, and decryption of both) the supplied EncryptedContent element.

Definition at line 37 of file decryptor.hpp.

Member Typedef Documentation

◆ DecryptSuccessCallback

using ndn::nac::Decryptor::DecryptSuccessCallback = std::function<void(ConstBufferPtr)>

Definition at line 40 of file decryptor.hpp.

Constructor & Destructor Documentation

◆ Decryptor()

ndn::nac::Decryptor::Decryptor ( const Key &  credentialsKey,
Validator &  validator,
KeyChain &  keyChain,
Face &  face 
)

Constructor.

Parameters
credentialsKeyCredentials key to be used to retrieve and decrypt KDK
validatorValidation policy to ensure validity of KDK and CK
keyChainKeyChain
faceFace that will be used to fetch CK and KDK

Definition at line 36 of file decryptor.cpp.

◆ ~Decryptor()

ndn::nac::Decryptor::~Decryptor ( )

Definition at line 45 of file decryptor.cpp.

Member Function Documentation

◆ decrypt()

void ndn::nac::Decryptor::decrypt ( const Block &  encryptedContent,
const DecryptSuccessCallback onSuccess,
const ErrorCallback onFailure 
)

Asynchronously decrypt encryptedContent.

Definition at line 59 of file decryptor.cpp.