NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::SignatureInfo Class Reference

#include <signature-info.hpp>

Classes

class  Error
 

Public Member Functions

 SignatureInfo ()
 
 SignatureInfo (tlv::SignatureTypeValue type)
 
 SignatureInfo (tlv::SignatureTypeValue type, const KeyLocator &keyLocator)
 
 SignatureInfo (const Block &block)
 Generate SignatureInfo from a block. More...
 
void setSignatureType (tlv::SignatureTypeValue type)
 Set SignatureType. More...
 
int32_t getSignatureType () const
 Get SignatureType. More...
 
bool hasKeyLocator () const
 Check if KeyLocator is set. More...
 
void setKeyLocator (const KeyLocator &keyLocator)
 Set KeyLocator. More...
 
void unsetKeyLocator ()
 Unset KeyLocator. More...
 
const KeyLocatorgetKeyLocator () const
 Get KeyLocator. More...
 
void setValidityPeriod (const security::ValidityPeriod &validityPeriod)
 Set ValidityPeriod. More...
 
void unsetValidityPeriod ()
 Unset ValidityPeriod. More...
 
security::ValidityPeriod getValidityPeriod () const
 Get ValidityPeriod. More...
 
void appendTypeSpecificTlv (const Block &block)
 Append signature type specific tlv block. More...
 
const BlockgetTypeSpecificTlv (uint32_t type) const
 Get signature type specific tlv block. More...
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 Encode to a wire format or estimate wire format. More...
 
const BlockwireEncode () const
 Encode to a wire format. More...
 
void wireDecode (const Block &wire)
 Decode from a wire format. More...
 
bool operator== (const SignatureInfo &rhs) const
 
bool operator!= (const SignatureInfo &rhs) const
 

Detailed Description

Definition at line 32 of file signature-info.hpp.

Constructor & Destructor Documentation

ndn::SignatureInfo::SignatureInfo ( )

Definition at line 37 of file signature-info.cpp.

Referenced by ndn::SignatureInfo::Error::Error().

ndn::SignatureInfo::SignatureInfo ( tlv::SignatureTypeValue  type)
explicit

Definition at line 43 of file signature-info.cpp.

ndn::SignatureInfo::SignatureInfo ( tlv::SignatureTypeValue  type,
const KeyLocator keyLocator 
)

Definition at line 49 of file signature-info.cpp.

ndn::SignatureInfo::SignatureInfo ( const Block block)
explicit

Generate SignatureInfo from a block.

Exceptions
tlv::Errorif supplied block is not formatted correctly

Definition at line 56 of file signature-info.cpp.

References wireDecode().

Member Function Documentation

void ndn::SignatureInfo::setSignatureType ( tlv::SignatureTypeValue  type)
int32_t ndn::SignatureInfo::getSignatureType ( ) const
inline

Get SignatureType.

Definition at line 66 of file signature-info.hpp.

Referenced by ndn::Signature::getType(), and ndn::Signature::operator bool().

void ndn::SignatureInfo::setKeyLocator ( const KeyLocator keyLocator)
void ndn::SignatureInfo::unsetKeyLocator ( )

Unset KeyLocator.

Definition at line 77 of file signature-info.cpp.

References ndn::tlv::KeyLocator, and ndn::Block::reset().

Referenced by hasKeyLocator(), and ndn::Signature::unsetKeyLocator().

const KeyLocator & ndn::SignatureInfo::getKeyLocator ( ) const

Get KeyLocator.

Exceptions
SignatureInfo::Errorif keyLocator does not exist

Definition at line 85 of file signature-info.cpp.

Referenced by ndn::Signature::getKeyLocator(), and hasKeyLocator().

void ndn::SignatureInfo::setValidityPeriod ( const security::ValidityPeriod validityPeriod)

Set ValidityPeriod.

Definition at line 94 of file signature-info.cpp.

References unsetValidityPeriod(), and ndn::security::ValidityPeriod::wireEncode().

Referenced by hasKeyLocator().

void ndn::SignatureInfo::unsetValidityPeriod ( )

Unset ValidityPeriod.

Definition at line 101 of file signature-info.cpp.

References ndn::Block::reset(), and ndn::tlv::ValidityPeriod.

Referenced by hasKeyLocator(), and setValidityPeriod().

security::ValidityPeriod ndn::SignatureInfo::getValidityPeriod ( ) const

Get ValidityPeriod.

Definition at line 110 of file signature-info.cpp.

References ndn::tlv::ValidityPeriod.

Referenced by hasKeyLocator().

void ndn::SignatureInfo::appendTypeSpecificTlv ( const Block block)

Append signature type specific tlv block.

Definition at line 120 of file signature-info.cpp.

Referenced by hasKeyLocator(), and wireDecode().

const Block & ndn::SignatureInfo::getTypeSpecificTlv ( uint32_t  type) const

Get signature type specific tlv block.

Exceptions
SignatureInfo::Errorif the block does not exist

Definition at line 127 of file signature-info.cpp.

Referenced by hasKeyLocator().

template<encoding::Tag TAG>
size_t ndn::SignatureInfo::wireEncode ( EncodingImpl< TAG > &  encoder) const

Encode to a wire format or estimate wire format.

Definition at line 141 of file signature-info.cpp.

References ndn::encoding::prependNonNegativeIntegerBlock(), ndn::tlv::SignatureInfo, ndn::tlv::SignatureType, and ndn::KeyLocator::wireEncode().

Referenced by ndn::Signature::getInfo().

const Block & ndn::SignatureInfo::wireEncode ( ) const

Encode to a wire format.

Definition at line 168 of file signature-info.cpp.

References ndn::Block::hasWire().

Referenced by hasKeyLocator().

bool ndn::SignatureInfo::operator== ( const SignatureInfo rhs) const

Definition at line 224 of file signature-info.cpp.

Referenced by hasKeyLocator().

bool ndn::SignatureInfo::operator!= ( const SignatureInfo rhs) const
inline

Definition at line 136 of file signature-info.hpp.


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