DigestSha256 signing and verification.
More...
#include <digest.hpp>
Inherits ndnph::PrivateKey, and ndnph::PublicKey.
|
| size_t | getMaxSigLen () const final |
| |
| void | updateSigInfo (SigInfo &sigInfo) const final |
| | Write SigType and KeyLocator.
|
| |
| ssize_t | sign (std::initializer_list< tlv::Value > chunks, uint8_t *sig) const final |
| | Perform signing.
|
| |
| bool | matchSigInfo (const SigInfo &sigInfo) const final |
| | Determine whether packet was signed by corresponding private key.
|
| |
| bool | verify (std::initializer_list< tlv::Value > chunks, const uint8_t *sig, size_t sigLen) const final |
| | Perform verification.
|
| |
| virtual | ~PrivateKey ()=default |
| |
| virtual | ~PublicKey ()=default |
| |
DigestSha256 signing and verification.
◆ get()
| static const DigestKey & ndnph::DigestKey::get |
( |
| ) |
|
|
inlinestatic |
◆ getMaxSigLen()
| size_t ndnph::DigestKey::getMaxSigLen |
( |
| ) |
const |
|
inlinefinalvirtual |
◆ matchSigInfo()
| bool ndnph::DigestKey::matchSigInfo |
( |
const SigInfo & |
sigInfo | ) |
const |
|
inlinefinalvirtual |
Determine whether packet was signed by corresponding private key.
Implements ndnph::PublicKey.
◆ sign()
| ssize_t ndnph::DigestKey::sign |
( |
std::initializer_list< tlv::Value > |
chunks, |
|
|
uint8_t * |
sig |
|
) |
| const |
|
inlinefinalvirtual |
Perform signing.
- Parameters
-
| chunks | signed portion. |
| [out] | sig | signature buffer, with getMaxSigLen() room. |
- Returns
- signature length, or -1 upon failure.
Implements ndnph::PrivateKey.
◆ updateSigInfo()
| void ndnph::DigestKey::updateSigInfo |
( |
SigInfo & |
sigInfo | ) |
const |
|
inlinefinalvirtual |
Write SigType and KeyLocator.
- Parameters
-
| [in,out] | sigInfo | SigInfo to update; other fields are unchanged. |
Implements ndnph::PrivateKey.
◆ verify()
| bool ndnph::DigestKey::verify |
( |
std::initializer_list< tlv::Value > |
chunks, |
|
|
const uint8_t * |
sig, |
|
|
size_t |
sigLen |
|
) |
| const |
|
inlinefinalvirtual |
Perform verification.
- Return values
-
| true | signature is correct. |
| false | error or signature is incorrect. |
Implements ndnph::PublicKey.
The documentation for this class was generated from the following file:
- /home/runner/work/esp8266ndn/NDNph/src/ndnph/keychain/digest.hpp