ndn::SignatureSha256WithEcdsa Class Reference

Represents a signature of Sha256WithEcdsa type. More...

#include <signature-sha256-with-ecdsa.hpp>

+ Inheritance diagram for ndn::SignatureSha256WithEcdsa:
+ Collaboration diagram for ndn::SignatureSha256WithEcdsa:

Public Member Functions

 SignatureSha256WithEcdsa (const KeyLocator &keyLocator=KeyLocator())
 Create Sha256WithEcdsa signature with specified KeyLocator. More...
 
 SignatureSha256WithEcdsa (const Signature &signature)
 Convert base Signature to Sha256WithEcdsa signature. More...
 
const BlockgetInfo () const
 Get SignatureInfo as wire format. More...
 
const KeyLocatorgetKeyLocator () const
 Get KeyLocator. More...
 
const SignatureInfogetSignatureInfo () const
 Get SignatureInfo. More...
 
tlv::SignatureTypeValue getType () const
 Get SignatureType. More...
 
const BlockgetValue () const
 Get SignatureValue. More...
 
bool hasKeyLocator () const
 Check if KeyLocator exists in SignatureInfo. More...
 
 operator bool () const
 Determine whether SignatureInfo is valid. More...
 
void setInfo (const Block &info)
 Decode SignatureInfo from wire format. More...
 
void setInfo (const SignatureInfo &info)
 Set SignatureInfo. More...
 
void setKeyLocator (const KeyLocator &keyLocator)
 Set KeyLocator. More...
 
void setValue (const Block &value)
 Set SignatureValue. More...
 

Protected Attributes

SignatureInfo m_info
 
Block m_value
 

Detailed Description

Represents a signature of Sha256WithEcdsa type.

This signature type provides integrity and provenance protection using an ECDSA signature over a SHA-256 digest.

Definition at line 34 of file signature-sha256-with-ecdsa.hpp.

Constructor & Destructor Documentation

ndn::SignatureSha256WithEcdsa::SignatureSha256WithEcdsa ( const KeyLocator keyLocator = KeyLocator())
explicit

Create Sha256WithEcdsa signature with specified KeyLocator.

Definition at line 26 of file signature-sha256-with-ecdsa.cpp.

ndn::SignatureSha256WithEcdsa::SignatureSha256WithEcdsa ( const Signature signature)
explicit

Convert base Signature to Sha256WithEcdsa signature.

Exceptions
Signature::ErrorSignatureType is not Sha256WithEcdsa

Definition at line 31 of file signature-sha256-with-ecdsa.cpp.

Member Function Documentation

const Block& ndn::Signature::getInfo ( ) const
inlineinherited

Get SignatureInfo as wire format.

Definition at line 77 of file signature.hpp.

const KeyLocator& ndn::Signature::getKeyLocator ( ) const
inlineinherited

Get KeyLocator.

Exceptions
tlv::ErrorKeyLocator does not exist in SignatureInfo

Definition at line 129 of file signature.hpp.

const SignatureInfo& ndn::Signature::getSignatureInfo ( ) const
inlineinherited

Get SignatureInfo.

Definition at line 69 of file signature.hpp.

tlv::SignatureTypeValue ndn::Signature::getType ( ) const
inherited

Get SignatureType.

Exceptions
Errorsignature is invalid

Definition at line 44 of file signature.cpp.

const Block& ndn::Signature::getValue ( ) const
inlineinherited

Get SignatureValue.

Definition at line 99 of file signature.hpp.

bool ndn::Signature::hasKeyLocator ( ) const
inlineinherited

Check if KeyLocator exists in SignatureInfo.

Definition at line 120 of file signature.hpp.

ndn::Signature::operator bool ( ) const
inlineexplicitinherited

Determine whether SignatureInfo is valid.

Definition at line 61 of file signature.hpp.

void ndn::Signature::setInfo ( const Block info)
inherited

Decode SignatureInfo from wire format.

Exceptions
tlv::Errordecode error

Definition at line 53 of file signature.cpp.

void ndn::Signature::setInfo ( const SignatureInfo info)
inlineinherited

Set SignatureInfo.

Definition at line 91 of file signature.hpp.

void ndn::Signature::setKeyLocator ( const KeyLocator keyLocator)
inlineinherited

Set KeyLocator.

Definition at line 137 of file signature.hpp.

void ndn::Signature::setValue ( const Block value)
inherited

Set SignatureValue.

Exceptions
tlv::ErrorTLV-TYPE of supplied block is not SignatureValue, or the block does not have TLV-VALUE

Definition at line 59 of file signature.cpp.

Member Data Documentation

SignatureInfo ndn::Signature::m_info
protectedinherited

Definition at line 154 of file signature.hpp.

Block ndn::Signature::m_value
mutableprotectedinherited

Definition at line 155 of file signature.hpp.