Holds SignatureInfo and SignatureValue in a Data packet. More...
#include <ndn-cxx/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 38 of file signature.hpp.
|
default |
Definition at line 29 of file signature.cpp.
|
explicit |
Definition at line 36 of file signature.cpp.
|
inline |
Get SignatureInfo as wire format.
Definition at line 78 of file signature.hpp.
|
inline |
Get KeyLocator.
tlv::Error | KeyLocator does not exist in SignatureInfo |
Definition at line 130 of file signature.hpp.
|
inline |
Get SignatureInfo.
Definition at line 70 of file signature.hpp.
tlv::SignatureTypeValue ndn::Signature::getType | ( | ) | const |
Get SignatureType.
Error | signature is invalid |
Definition at line 43 of file signature.cpp.
|
inline |
Get SignatureValue.
Definition at line 100 of file signature.hpp.
|
inline |
Check if KeyLocator exists in SignatureInfo.
Definition at line 121 of file signature.hpp.
|
inlineexplicit |
Determine whether SignatureInfo is valid.
Definition at line 62 of file signature.hpp.
void ndn::Signature::setInfo | ( | const Block & | info | ) |
Decode SignatureInfo from wire format.
tlv::Error | decode error |
Definition at line 52 of file signature.cpp.
|
inline |
Set SignatureInfo.
Definition at line 92 of file signature.hpp.
|
inline |
Set KeyLocator.
Definition at line 138 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 58 of file signature.cpp.
|
inline |
Unset KeyLocator.
Definition at line 149 of file signature.hpp.
|
protected |
Definition at line 155 of file signature.hpp.
|
mutableprotected |
Definition at line 156 of file signature.hpp.