ndn::SignatureSha256WithRsa Class Reference

Represent a SHA256-with-RSA signature. More...

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

Inheritance diagram for ndn::SignatureSha256WithRsa:
[legend]
Collaboration diagram for ndn::SignatureSha256WithRsa:
[legend]

Data Structures

class  Error
 

Public Types

enum  { Sha256 = tlv::DigestSha256, Sha256WithRsa = tlv::SignatureSha256WithRsa, Sha256WithEcdsa = tlv::SignatureSha256WithEcdsa }
 

Public Member Functions

 SignatureSha256WithRsa (const KeyLocator &keyLocator=KeyLocator())
 
 SignatureSha256WithRsa (const Signature &signature)
 
 operator bool () const
 
const BlockgetInfo () const
 Get SignatureInfo in the wire format. More...
 
const SignatureInfogetSignatureInfo () const
 Get SignatureInfo. More...
 
void setInfo (const Block &info)
 Set SignatureInfo from a block. More...
 
void setInfo (const SignatureInfo &info)
 Set SignatureInfo. More...
 
const BlockgetValue () const
 Get SignatureValue in the wire format. More...
 
void setValue (const Block &value)
 Get SignatureValue from a block. More...
 
uint32_t getType () const
 Get signature type. More...
 
bool hasKeyLocator () const
 Check if SignatureInfo block has a KeyLocator. More...
 
const KeyLocatorgetKeyLocator () const
 Get KeyLocator. More...
 
void setKeyLocator (const KeyLocator &keyLocator)
 Set KeyLocator. More...
 
bool operator== (const Signature &other) const
 
bool operator!= (const Signature &other) const
 

Protected Attributes

SignatureInfo m_info
 
Block m_value
 

Detailed Description

Represent a SHA256-with-RSA signature.

Definition at line 32 of file signature-sha256-with-rsa.hpp.

Member Enumeration Documentation

anonymous enum
inherited
Deprecated:
use tlv::SignatureTypeValue instead.
Enumerator
Sha256 
Sha256WithRsa 
Sha256WithEcdsa 

Definition at line 47 of file signature.hpp.

Constructor & Destructor Documentation

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

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

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

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

Member Function Documentation

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

Get SignatureInfo in the wire format.

Definition at line 70 of file signature.hpp.

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

Get KeyLocator.

Exceptions
Signature::Errorif KeyLocator does not exist

Definition at line 143 of file signature.hpp.

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

Get SignatureInfo.

Definition at line 79 of file signature.hpp.

uint32_t ndn::Signature::getType ( ) const
inlineinherited

Get signature type.

Definition at line 123 of file signature.hpp.

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

Get SignatureValue in the wire format.

Definition at line 105 of file signature.hpp.

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

Check if SignatureInfo block has a KeyLocator.

Definition at line 132 of file signature.hpp.

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

Definition at line 61 of file signature.hpp.

bool ndn::Signature::operator!= ( const Signature other) const
inlineinherited

Definition at line 178 of file signature.hpp.

bool ndn::Signature::operator== ( const Signature other) const
inlineinherited

Definition at line 171 of file signature.hpp.

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

Set SignatureInfo from a block.

Exceptions
tlv::Errorif supplied block is not formatted correctly

Definition at line 44 of file signature.cpp.

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

Set SignatureInfo.

Definition at line 96 of file signature.hpp.

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

Set KeyLocator.

Definition at line 152 of file signature.hpp.

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

Get SignatureValue from a block.

Exceptions
tlv::Errorif supplied block has type different from SignatureValue

Definition at line 50 of file signature.cpp.

Field Documentation

SignatureInfo ndn::Signature::m_info
protectedinherited

Definition at line 184 of file signature.hpp.

Block ndn::Signature::m_value
mutableprotectedinherited

Definition at line 185 of file signature.hpp.