NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::crypto Namespace Reference

Functions

ConstBufferPtr computeSha256Digest (const uint8_t *data, size_t dataLength)
 Compute the sha-256 digest of data. More...
 
ConstBufferPtr sha256 (const uint8_t *data, size_t dataLength)
 Compute the sha-256 digest of data. More...
 

Variables

static const size_t SHA256_DIGEST_SIZE = 32
 number of octets in a SHA256 digest More...
 

Function Documentation

◆ computeSha256Digest()

ConstBufferPtr ndn::crypto::computeSha256Digest ( const uint8_t *  data,
size_t  dataLength 
)

Compute the sha-256 digest of data.

Parameters
dataPointer to the input byte array.
dataLengthThe length of data.
Returns
A pointer to a buffer of SHA256_DIGEST.

Definition at line 31 of file crypto.cpp.

References ndn::OBufferStream::buf(), and ndn::SHA256.

Referenced by ndn::security::v1::PublicKey::computeDigest(), ndn::security::KeyChain::getDefaultKeyParamsForIdentity(), ndn::Data::getFullName(), sha256(), ndn::security::KeyChain::signWithSha256(), and ndn::security::Validator::verifySignature().

◆ sha256()

ConstBufferPtr ndn::crypto::sha256 ( const uint8_t *  data,
size_t  dataLength 
)
inline

Compute the sha-256 digest of data.

Deprecated:
Use computeSha256Digest function instead

Definition at line 50 of file crypto.hpp.

References computeSha256Digest().

Variable Documentation

◆ SHA256_DIGEST_SIZE

const size_t ndn::crypto::SHA256_DIGEST_SIZE = 32
static