NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::DigestSha256 Class Reference

Represents a signature of DigestSha256 type. More...

#include <digest-sha256.hpp>

Inheritance diagram for ndn::DigestSha256:
Collaboration diagram for ndn::DigestSha256:

Public Member Functions

 DigestSha256 ()
 Create empty DigestSha256 signature. More...
 
 DigestSha256 (const Signature &signature)
 Convert base Signature to DigestSha256 signature. More...
 
- Public Member Functions inherited from ndn::Signature
 Signature ()=default
 
 Signature (const Block &info, const Block &value=Block())
 
 Signature (const SignatureInfo &info, const Block &value=Block())
 
 operator bool () const
 Determine whether SignatureInfo is valid. More...
 
const SignatureInfogetSignatureInfo () const
 Get SignatureInfo. More...
 
const BlockgetInfo () const
 Get SignatureInfo as wire format. More...
 
void setInfo (const Block &info)
 Decode SignatureInfo from wire format. More...
 
void setInfo (const SignatureInfo &info)
 Set SignatureInfo. More...
 
const BlockgetValue () const
 Get SignatureValue. More...
 
void setValue (const Block &value)
 Set SignatureValue. More...
 
tlv::SignatureTypeValue getType () const
 Get SignatureType. More...
 
bool hasKeyLocator () const
 Check if KeyLocator exists in SignatureInfo. More...
 
const KeyLocatorgetKeyLocator () const
 Get KeyLocator. More...
 
void setKeyLocator (const KeyLocator &keyLocator)
 Set KeyLocator. More...
 
void unsetKeyLocator ()
 Unset KeyLocator. More...
 

Additional Inherited Members

- Protected Attributes inherited from ndn::Signature
SignatureInfo m_info
 
Block m_value
 

Detailed Description

Represents a signature of DigestSha256 type.

This signature type provides integrity protection using SHA-256 digest, but no provenance of a Data packet or any kind of guarantee that packet is from the original source.

Definition at line 34 of file digest-sha256.hpp.

Constructor & Destructor Documentation

◆ DigestSha256() [1/2]

ndn::DigestSha256::DigestSha256 ( )

Create empty DigestSha256 signature.

Definition at line 26 of file digest-sha256.cpp.

◆ DigestSha256() [2/2]

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

Convert base Signature to DigestSha256 signature.

Exceptions
Signature::ErrorSignatureType is not DigestSha256

Definition at line 31 of file digest-sha256.cpp.

References ndn::tlv::DigestSha256, ndn::Signature::getType(), NDN_THROW, and ndn::to_string().


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