Represents a SignatureInfo TLV element. More...
#include <signature-info.hpp>
Classes | |
class | Error |
Public Member Functions | |
SignatureInfo () | |
Create an invalid SignatureInfo. More... | |
SignatureInfo (tlv::SignatureTypeValue type) | |
Create with specified type. More... | |
SignatureInfo (tlv::SignatureTypeValue type, const KeyLocator &keyLocator) | |
Create with specified type and KeyLocator. More... | |
SignatureInfo (const Block &wire) | |
Create from wire encoding. More... | |
void | appendTypeSpecificTlv (const Block &element) |
Append SignatureType-specific sub-element. More... | |
const KeyLocator & | getKeyLocator () const |
Get KeyLocator. More... | |
int32_t | getSignatureType () const |
Get SignatureType. More... | |
const Block & | getTypeSpecificTlv (uint32_t type) const |
Get SignatureType-specific sub-element. More... | |
security::ValidityPeriod | getValidityPeriod () const |
Get ValidityPeriod. More... | |
bool | hasKeyLocator () const |
Check if KeyLocator exists. More... | |
void | setKeyLocator (const KeyLocator &keyLocator) |
Set KeyLocator. More... | |
void | setSignatureType (tlv::SignatureTypeValue type) |
Set SignatureType. More... | |
void | setValidityPeriod (const security::ValidityPeriod &validityPeriod) |
Set ValidityPeriod. More... | |
void | unsetKeyLocator () |
Unset KeyLocator. More... | |
void | unsetValidityPeriod () |
Unset ValidityPeriod. More... | |
void | wireDecode (const Block &wire) |
Decode from wire format. More... | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Fast encoding or block size estimation. More... | |
const Block & | wireEncode () const |
Encode to wire format. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SignatureInfo &info) |
bool | operator== (const SignatureInfo &lhs, const SignatureInfo &rhs) |
Represents a SignatureInfo TLV element.
Definition at line 33 of file signature-info.hpp.
ndn::SignatureInfo::SignatureInfo | ( | ) |
Create an invalid SignatureInfo.
Definition at line 35 of file signature-info.cpp.
|
explicit |
Create with specified type.
Definition at line 41 of file signature-info.cpp.
ndn::SignatureInfo::SignatureInfo | ( | tlv::SignatureTypeValue | type, |
const KeyLocator & | keyLocator | ||
) |
Create with specified type and KeyLocator.
Definition at line 47 of file signature-info.cpp.
|
explicit |
Create from wire encoding.
tlv::Error | decode error |
Definition at line 54 of file signature-info.cpp.
void ndn::SignatureInfo::appendTypeSpecificTlv | ( | const Block & | element | ) |
Append SignatureType-specific sub-element.
Definition at line 214 of file signature-info.cpp.
const KeyLocator & ndn::SignatureInfo::getKeyLocator | ( | ) | const |
Get KeyLocator.
Error | KeyLocator does not exist |
Definition at line 152 of file signature-info.cpp.
|
inline |
Get SignatureType.
Definition at line 88 of file signature-info.hpp.
const Block & ndn::SignatureInfo::getTypeSpecificTlv | ( | uint32_t | type | ) | const |
Get SignatureType-specific sub-element.
type | TLV-TYPE of sub-element |
Error | sub-element of specified type does not exist |
Definition at line 203 of file signature-info.cpp.
security::ValidityPeriod ndn::SignatureInfo::getValidityPeriod | ( | ) | const |
Get ValidityPeriod.
Error | ValidityPeriod does not exist |
Definition at line 177 of file signature-info.cpp.
|
inline |
Check if KeyLocator exists.
Definition at line 101 of file signature-info.hpp.
void ndn::SignatureInfo::setKeyLocator | ( | const KeyLocator & | keyLocator | ) |
Set KeyLocator.
Definition at line 161 of file signature-info.cpp.
void ndn::SignatureInfo::setSignatureType | ( | tlv::SignatureTypeValue | type | ) |
Set SignatureType.
Definition at line 145 of file signature-info.cpp.
void ndn::SignatureInfo::setValidityPeriod | ( | const security::ValidityPeriod & | validityPeriod | ) |
Set ValidityPeriod.
Definition at line 187 of file signature-info.cpp.
void ndn::SignatureInfo::unsetKeyLocator | ( | ) |
Unset KeyLocator.
Definition at line 169 of file signature-info.cpp.
void ndn::SignatureInfo::unsetValidityPeriod | ( | ) |
Unset ValidityPeriod.
Definition at line 194 of file signature-info.cpp.
void ndn::SignatureInfo::wireDecode | ( | const Block & | wire | ) |
Decode from wire format.
tlv::Error | decode error |
Definition at line 109 of file signature-info.cpp.
size_t ndn::SignatureInfo::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Fast encoding or block size estimation.
encoder | EncodingEstimator or EncodingBuffer instance |
Definition at line 61 of file signature-info.cpp.
const Block & ndn::SignatureInfo::wireEncode | ( | ) | const |
Encode to wire format.
Definition at line 93 of file signature-info.cpp.
|
friend |
Definition at line 230 of file signature-info.cpp.
|
friend |
Definition at line 221 of file signature-info.cpp.