Holds SignatureInfo and SignatureValue in a Data packet. More...
#include <signature.hpp>
Classes | |
class | Error |
Public Member Functions | |
Signature ()=default | |
Signature (const Block &info, const Block &value=Block()) | |
Signature (const SignatureInfo &info, const Block &value=Block()) | |
const Block & | getInfo () const |
Get SignatureInfo as wire format. More... | |
const KeyLocator & | getKeyLocator () const |
Get KeyLocator. More... | |
const SignatureInfo & | getSignatureInfo () const |
Get SignatureInfo. More... | |
tlv::SignatureTypeValue | getType () const |
Get SignatureType. More... | |
const Block & | getValue () const |
Get SignatureValue. More... | |
bool | hasKeyLocator () const |
Check if KeyLocator exists in SignatureInfo. More... | |
operator bool () const | |
Determine whether SignatureInfo is valid. More... | |
void | setInfo (const Block &info) |
Decode SignatureInfo from wire format. More... | |
void | setInfo (const SignatureInfo &info) |
Set SignatureInfo. More... | |
void | setKeyLocator (const KeyLocator &keyLocator) |
Set KeyLocator. More... | |
void | setValue (const Block &value) |
Set SignatureValue. More... | |
void | unsetKeyLocator () |
Unset KeyLocator. More... | |
Protected Attributes | |
SignatureInfo | m_info |
Block | m_value |
Holds SignatureInfo and SignatureValue in a Data packet.
A Signature is not a TLV element itself. It collects SignatureInfo and SignatureValue TLV elements together for easy access. In most cases, an application should use a subclass of Signature such as DigestSha256
, SignatureSha256WithRsa
, or SignatureSha256WithEcdsa
instead of using Signature
type directly.
Definition at line 37 of file signature.hpp.
|
default |
Definition at line 30 of file signature.cpp.
|
explicit |
Definition at line 37 of file signature.cpp.
|
inline |
Get SignatureInfo as wire format.
Definition at line 77 of file signature.hpp.
|
inline |
Get KeyLocator.
tlv::Error | KeyLocator does not exist in SignatureInfo |
Definition at line 129 of file signature.hpp.
|
inline |
Get SignatureInfo.
Definition at line 69 of file signature.hpp.
tlv::SignatureTypeValue ndn::Signature::getType | ( | ) | const |
Get SignatureType.
Error | signature is invalid |
Definition at line 44 of file signature.cpp.
|
inline |
Get SignatureValue.
Definition at line 99 of file signature.hpp.
|
inline |
Check if KeyLocator exists in SignatureInfo.
Definition at line 120 of file signature.hpp.
|
inlineexplicit |
Determine whether SignatureInfo is valid.
Definition at line 61 of file signature.hpp.
void ndn::Signature::setInfo | ( | const Block & | info | ) |
Decode SignatureInfo from wire format.
tlv::Error | decode error |
Definition at line 53 of file signature.cpp.
|
inline |
Set SignatureInfo.
Definition at line 91 of file signature.hpp.
|
inline |
Set KeyLocator.
Definition at line 137 of file signature.hpp.
void ndn::Signature::setValue | ( | const Block & | value | ) |
Set SignatureValue.
tlv::Error | TLV-TYPE of supplied block is not SignatureValue, or the block does not have TLV-VALUE |
Definition at line 59 of file signature.cpp.
|
inline |
Unset KeyLocator.
Definition at line 148 of file signature.hpp.
|
protected |
Definition at line 154 of file signature.hpp.
|
mutableprotected |
Definition at line 155 of file signature.hpp.