Represents a signature of DigestSha256 type. More...
#include <digest-sha256.hpp>
Public Member Functions | |
DigestSha256 () | |
Create empty DigestSha256 signature. More... | |
DigestSha256 (const Signature &signature) | |
Convert base Signature to DigestSha256 signature. More... | |
Public Member Functions inherited from ndn::Signature | |
Signature ()=default | |
Signature (const Block &info, const Block &value=Block()) | |
Signature (const SignatureInfo &info, const Block &value=Block()) | |
operator bool () const | |
Determine whether SignatureInfo is valid. More... | |
const SignatureInfo & | getSignatureInfo () const |
Get SignatureInfo. More... | |
const Block & | getInfo () const |
Get SignatureInfo as wire format. More... | |
void | setInfo (const Block &info) |
Decode SignatureInfo from wire format. More... | |
void | setInfo (const SignatureInfo &info) |
Set SignatureInfo. More... | |
const Block & | getValue () const |
Get SignatureValue. More... | |
void | setValue (const Block &value) |
Set SignatureValue. More... | |
tlv::SignatureTypeValue | getType () const |
Get SignatureType. More... | |
bool | hasKeyLocator () const |
Check if KeyLocator exists in SignatureInfo. More... | |
const KeyLocator & | getKeyLocator () const |
Get KeyLocator. More... | |
void | setKeyLocator (const KeyLocator &keyLocator) |
Set KeyLocator. More... | |
void | unsetKeyLocator () |
Unset KeyLocator. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ndn::Signature | |
SignatureInfo | m_info |
Block | m_value |
Represents a signature of DigestSha256 type.
This signature type provides integrity protection using SHA-256 digest, but no provenance of a Data packet or any kind of guarantee that packet is from the original source.
Definition at line 34 of file digest-sha256.hpp.
ndn::DigestSha256::DigestSha256 | ( | ) |
Create empty DigestSha256 signature.
Definition at line 26 of file digest-sha256.cpp.
|
explicit |
Convert base Signature to DigestSha256 signature.
Signature::Error | SignatureType is not DigestSha256 |
Definition at line 31 of file digest-sha256.cpp.
References ndn::tlv::DigestSha256, ndn::Signature::getType(), NDN_THROW, and ndn::to_string().