Public Member Functions | Static Public Member Functions | Friends | List of all members
ndn::EncryptedContentLite Class Reference

An EncryptedContentLite holds an encryption type, a payload and other fields representing encrypted content. More...

#include <encrypted-content-lite.hpp>

Inheritance diagram for ndn::EncryptedContentLite:
ndn_EncryptedContent

Public Member Functions

 EncryptedContentLite (ndn_NameComponent *keyNameComponents, size_t maxKeyNameComponents)
 Create a EncryptedContentLite with values for none. More...
 
ndn_EncryptAlgorithmType getAlgorithmType () const
 Get the algorithm type. More...
 
const KeyLocatorLitegetKeyLocator () const
 Get the key locator. More...
 
KeyLocatorLitegetKeyLocator ()
 
const BlobLitegetInitialVector () const
 Get the initial vector. More...
 
const BlobLitegetPayload () const
 Get the payload. More...
 
EncryptedContentLitesetAlgorithmType (ndn_EncryptAlgorithmType algorithmType)
 Set the algorithm type. More...
 
EncryptedContentLitesetInitialVector (const BlobLite &initialVector)
 Set the initial vector. More...
 
EncryptedContentLitesetPayload (const BlobLite &payload)
 Set the encrypted payload. More...
 
ndn_Error set (const EncryptedContentLite &other)
 Set this encryptedContent to have the values from the other encryptedContent. More...
 

Static Public Member Functions

static EncryptedContentLitedownCast (ndn_EncryptedContent &encryptedContent)
 Downcast the reference to the ndn_EncryptedContent struct to an EncryptedContentLite. More...
 
static const EncryptedContentLitedownCast (const ndn_EncryptedContent &encryptedContent)
 

Friends

class Tlv0_1_1WireFormatLite
 

Detailed Description

An EncryptedContentLite holds an encryption type, a payload and other fields representing encrypted content.

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

Constructor & Destructor Documentation

ndn::EncryptedContentLite::EncryptedContentLite ( ndn_NameComponent keyNameComponents,
size_t  maxKeyNameComponents 
)

Create a EncryptedContentLite with values for none.

Parameters
keyNameComponentsThe pre-allocated array of ndn_NameComponent for the keyLocatorLite. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily.
maxKeyNameComponentsThe number of elements in the allocated keyNameComponents array.

Member Function Documentation

static EncryptedContentLite& ndn::EncryptedContentLite::downCast ( ndn_EncryptedContent encryptedContent)
inlinestatic

Downcast the reference to the ndn_EncryptedContent struct to an EncryptedContentLite.

Parameters
encryptedContentA reference to the ndn_EncryptedContent struct.
Returns
The same reference as EncryptedContentLite.
ndn_EncryptAlgorithmType ndn::EncryptedContentLite::getAlgorithmType ( ) const
inline

Get the algorithm type.

Returns
The algorithm type, or -1 if not specified.
const BlobLite& ndn::EncryptedContentLite::getInitialVector ( ) const
inline

Get the initial vector.

Returns
The initial vector. If not specified, isNull() is true.
const KeyLocatorLite& ndn::EncryptedContentLite::getKeyLocator ( ) const
inline

Get the key locator.

Returns
The key locator. If not specified, getType() is -1.
const BlobLite& ndn::EncryptedContentLite::getPayload ( ) const
inline

Get the payload.

Returns
The payload. If not specified, isNull() is true.
ndn_Error ndn::EncryptedContentLite::set ( const EncryptedContentLite other)

Set this encryptedContent to have the values from the other encryptedContent.

Parameters
otherThe other EncryptedContentLite to get values from.
Returns
0 for success, or an error code if there is not enough room in this object's key locator keyName components array.
EncryptedContentLite& ndn::EncryptedContentLite::setAlgorithmType ( ndn_EncryptAlgorithmType  algorithmType)
inline

Set the algorithm type.

Parameters
algorithmTypeThe algorithm type. If not specified, set to -1.
Returns
This EncryptedContentLite so that you can chain calls to update values.
EncryptedContentLite& ndn::EncryptedContentLite::setInitialVector ( const BlobLite initialVector)
inline

Set the initial vector.

Parameters
initialVectorThe initial vector. If not specified, set to the default BlobLite() where isNull() is true.
Returns
This EncryptedContentLite so that you can chain calls to update values.
EncryptedContentLite& ndn::EncryptedContentLite::setPayload ( const BlobLite payload)
inline

Set the encrypted payload.

Parameters
payloadThe encrypted payload. If not specified, set to the default BlobLite() where isNull() is true.
Returns
This EncryptedContentLite so that you can chain calls to update values.

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