ndn::nac::EncryptedContent Class Reference

Encrypted content. More...

#include <encrypted-content.hpp>

Classes

class  Error
 

Public Member Functions

 EncryptedContent ()=default
 
 EncryptedContent (const Block &block)
 
const Block & getIv () const
 
const Name & getKeyLocator () const
 
const Block & getPayload () const
 
const Block & getPayloadKey () const
 
bool hasIv () const noexcept
 
bool hasKeyLocator () const
 
bool hasPayloadKey () const noexcept
 
EncryptedContentsetIv (Block iv)
 
EncryptedContentsetIv (ConstBufferPtr iv)
 
EncryptedContentsetKeyLocator (Name keyLocator)
 
EncryptedContentsetPayload (Block payload)
 
EncryptedContentsetPayload (ConstBufferPtr payload)
 
EncryptedContentsetPayloadKey (Block key)
 
EncryptedContentsetPayloadKey (ConstBufferPtr key)
 
EncryptedContentunsetIv ()
 
EncryptedContentunsetKeyLocator ()
 
EncryptedContentunsetPayloadKey ()
 
void wireDecode (const Block &wire)
 
const Block & wireEncode () const
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &block) const
 

Detailed Description

Encrypted content.

* EncryptedContent ::= ENCRYPTED-CONTENT-TYPE TLV-LENGTH
*                        InitializationVector
*                        EncryptedPayload
*                        EncryptedPayloadKey
*                        Name
*
* InitializationVector ::= INITIALIZATION-VECTOR-TYPE TLV-LENGTH(=N) BYTE{N}
* EncryptedPayload ::= ENCRYPTED-PAYLOAD-TYPE TLV-LENGTH(=N) BYTE{N}
* EncryptedPayloadKey ::= ENCRYPTED-PAYLOAD-KEY-TYPE TLV-LENGTH(=N) BYTE{N}
* 

Definition at line 44 of file encrypted-content.hpp.

Constructor & Destructor Documentation

◆ EncryptedContent() [1/2]

ndn::nac::EncryptedContent::EncryptedContent ( )
default

◆ EncryptedContent() [2/2]

ndn::nac::EncryptedContent::EncryptedContent ( const Block &  block)
explicit

Definition at line 33 of file encrypted-content.cpp.

Member Function Documentation

◆ getIv()

const Block& ndn::nac::EncryptedContent::getIv ( ) const
inline

Definition at line 78 of file encrypted-content.hpp.

◆ getKeyLocator()

const Name& ndn::nac::EncryptedContent::getKeyLocator ( ) const
inline

Definition at line 120 of file encrypted-content.hpp.

◆ getPayload()

const Block& ndn::nac::EncryptedContent::getPayload ( ) const
inline

Definition at line 60 of file encrypted-content.hpp.

◆ getPayloadKey()

const Block& ndn::nac::EncryptedContent::getPayloadKey ( ) const
inline

Definition at line 99 of file encrypted-content.hpp.

◆ hasIv()

bool ndn::nac::EncryptedContent::hasIv ( ) const
inlinenoexcept

Definition at line 72 of file encrypted-content.hpp.

◆ hasKeyLocator()

bool ndn::nac::EncryptedContent::hasKeyLocator ( ) const
inline

Definition at line 114 of file encrypted-content.hpp.

◆ hasPayloadKey()

bool ndn::nac::EncryptedContent::hasPayloadKey ( ) const
inlinenoexcept

Definition at line 93 of file encrypted-content.hpp.

◆ setIv() [1/2]

EncryptedContent & ndn::nac::EncryptedContent::setIv ( Block  iv)

Definition at line 60 of file encrypted-content.cpp.

◆ setIv() [2/2]

EncryptedContent & ndn::nac::EncryptedContent::setIv ( ConstBufferPtr  iv)

Definition at line 73 of file encrypted-content.cpp.

◆ setKeyLocator()

EncryptedContent & ndn::nac::EncryptedContent::setKeyLocator ( Name  keyLocator)

Definition at line 118 of file encrypted-content.cpp.

◆ setPayload() [1/2]

EncryptedContent & ndn::nac::EncryptedContent::setPayload ( Block  payload)

Definition at line 39 of file encrypted-content.cpp.

◆ setPayload() [2/2]

EncryptedContent & ndn::nac::EncryptedContent::setPayload ( ConstBufferPtr  payload)

Definition at line 52 of file encrypted-content.cpp.

◆ setPayloadKey() [1/2]

EncryptedContent & ndn::nac::EncryptedContent::setPayloadKey ( Block  key)

Definition at line 89 of file encrypted-content.cpp.

◆ setPayloadKey() [2/2]

EncryptedContent & ndn::nac::EncryptedContent::setPayloadKey ( ConstBufferPtr  key)

Definition at line 102 of file encrypted-content.cpp.

◆ unsetIv()

EncryptedContent & ndn::nac::EncryptedContent::unsetIv ( )

Definition at line 81 of file encrypted-content.cpp.

◆ unsetKeyLocator()

EncryptedContent & ndn::nac::EncryptedContent::unsetKeyLocator ( )

Definition at line 126 of file encrypted-content.cpp.

◆ unsetPayloadKey()

EncryptedContent & ndn::nac::EncryptedContent::unsetPayloadKey ( )

Definition at line 110 of file encrypted-content.cpp.

◆ wireDecode()

void ndn::nac::EncryptedContent::wireDecode ( const Block &  wire)

Definition at line 180 of file encrypted-content.cpp.

◆ wireEncode() [1/2]

const Block & ndn::nac::EncryptedContent::wireEncode ( ) const

Definition at line 164 of file encrypted-content.cpp.

◆ wireEncode() [2/2]

template<encoding::Tag TAG>
size_t ndn::nac::EncryptedContent::wireEncode ( EncodingImpl< TAG > &  block) const

Definition at line 135 of file encrypted-content.cpp.