Null signature: packet is not signed.
More...
#include <null.hpp>
Inherits ndnph::PrivateKey, and ndnph::PublicKey.
Null signature: packet is not signed.
Signing produces an empty signature. Verification does nothing and accepts any signature type.
- Note
- This is intended in testing environments or for experimental purposes.
- See also
- https://redmine.named-data.net/projects/ndn-tlv/wiki/NullSignature
◆ get()
| static const NullKey & ndnph::NullKey::get |
( |
| ) |
|
|
inlinestatic |
◆ getMaxSigLen()
| size_t ndnph::NullKey::getMaxSigLen |
( |
| ) |
const |
|
inlinefinalvirtual |
◆ matchSigInfo()
| bool ndnph::NullKey::matchSigInfo |
( |
const SigInfo & |
sigInfo | ) |
const |
|
inlinefinalvirtual |
Determine whether packet was signed by corresponding private key.
Implements ndnph::PublicKey.
◆ sign()
| ssize_t ndnph::NullKey::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::NullKey::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::NullKey::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/null.hpp