Public Member Functions | List of all members
ndn::Signature Class Referenceabstract

A Signature is an abstract base class providing methods to work with the signature information in a Data packet. More...

#include <signature.hpp>

Inheritance diagram for ndn::Signature:
ndn::DigestSha256Signature ndn::GenericSignature ndn::HmacWithSha256Signature ndn::Sha256WithEcdsaSignature ndn::Sha256WithRsaSignature

Public Member Functions

virtual ~Signature ()
 The virtual destructor.
 
virtual ptr_lib::shared_ptr< Signatureclone () const =0
 Return a pointer to a new Signature which is a copy of this signature. More...
 
virtual const BlobgetSignature () const =0
 Get the signature bytes. More...
 
virtual void setSignature (const Blob &signature)=0
 Set the signature bytes to the given value. More...
 
virtual void get (SignatureLite &signatureLite) const =0
 Set signatureLite to point to the values in this signature object, without copying any memory. More...
 
virtual void set (const SignatureLite &signatureLite)=0
 Clear this signature, and set the values by copying from signatureLite. More...
 
virtual uint64_t getChangeCount () const =0
 Get the change count, which is incremented each time this object (or a child object) is changed. More...
 

Detailed Description

A Signature is an abstract base class providing methods to work with the signature information in a Data packet.

You must create an object of a subclass, for example Sha256WithRsaSignature.

Member Function Documentation

virtual ptr_lib::shared_ptr<Signature> ndn::Signature::clone ( ) const
pure virtual

Return a pointer to a new Signature which is a copy of this signature.

This is pure virtual, the subclass must implement it.

Implemented in ndn::GenericSignature, ndn::HmacWithSha256Signature, ndn::Sha256WithEcdsaSignature, ndn::DigestSha256Signature, and ndn::Sha256WithRsaSignature.

virtual void ndn::Signature::get ( SignatureLite signatureLite) const
pure virtual

Set signatureLite to point to the values in this signature object, without copying any memory.

WARNING: The resulting pointers in signatureLite are invalid after a further use of this object which could reallocate memory. This is pure virtual, the subclass must implement it.

Parameters
signatureLiteA SignatureLite object where the name components array is already allocated.

Implemented in ndn::GenericSignature, ndn::HmacWithSha256Signature, ndn::Sha256WithEcdsaSignature, ndn::DigestSha256Signature, and ndn::Sha256WithRsaSignature.

virtual uint64_t ndn::Signature::getChangeCount ( ) const
pure virtual

Get the change count, which is incremented each time this object (or a child object) is changed.

Returns
The change count.

Implemented in ndn::GenericSignature, ndn::HmacWithSha256Signature, ndn::Sha256WithEcdsaSignature, ndn::Sha256WithRsaSignature, and ndn::DigestSha256Signature.

virtual const Blob& ndn::Signature::getSignature ( ) const
pure virtual

Get the signature bytes.

Returns
The signature bytes. If not specified, the value isNull().

Implemented in ndn::GenericSignature, ndn::HmacWithSha256Signature, ndn::Sha256WithEcdsaSignature, ndn::DigestSha256Signature, and ndn::Sha256WithRsaSignature.

virtual void ndn::Signature::set ( const SignatureLite signatureLite)
pure virtual

Clear this signature, and set the values by copying from signatureLite.

This is pure virtual, the subclass must implement it.

Parameters
signatureLiteA SignatureLite object.

Implemented in ndn::GenericSignature, ndn::HmacWithSha256Signature, ndn::Sha256WithEcdsaSignature, ndn::DigestSha256Signature, and ndn::Sha256WithRsaSignature.

virtual void ndn::Signature::setSignature ( const Blob signature)
pure virtual

Set the signature bytes to the given value.

Parameters
signatureA Blob with the signature bytes.

Implemented in ndn::GenericSignature, ndn::HmacWithSha256Signature, ndn::Sha256WithEcdsaSignature, ndn::Sha256WithRsaSignature, and ndn::DigestSha256Signature.


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