esp8266ndn
NDN Arduino library for ESP8266 and more
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ndnph::NullKey Class Reference

Null signature: packet is not signed. More...

#include <null.hpp>

Inherits ndnph::PrivateKey, and ndnph::PublicKey.

Public Member Functions

size_t getMaxSigLen () const final
 
void updateSigInfo (SigInfo &sigInfo) const final
 Write SigType and KeyLocator.
 
ssize_t sign (std::initializer_list< tlv::Value >, uint8_t *) const final
 Perform signing.
 
bool matchSigInfo (const SigInfo &) const final
 Determine whether packet was signed by corresponding private key.
 
bool verify (std::initializer_list< tlv::Value >, const uint8_t *, size_t) const final
 Perform verification.
 
- Public Member Functions inherited from ndnph::PrivateKey
virtual ~PrivateKey ()=default
 
- Public Member Functions inherited from ndnph::PublicKey
virtual ~PublicKey ()=default
 

Static Public Member Functions

static const NullKeyget ()
 

Detailed Description

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

Member Function Documentation

◆ get()

static const NullKey & ndnph::NullKey::get ( )
inlinestatic

◆ getMaxSigLen()

size_t ndnph::NullKey::getMaxSigLen ( ) const
inlinefinalvirtual

Implements ndnph::PrivateKey.

◆ 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
chunkssigned portion.
[out]sigsignature 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]sigInfoSigInfo 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
truesignature is correct.
falseerror or signature is incorrect.

Implements ndnph::PublicKey.


The documentation for this class was generated from the following file: