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

Functions

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

◆ sha256()

ConstBufferPtr ndn::crypto::sha256 ( 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 51 of file crypto.cpp.

References ndn::OBufferStream::buf().

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

Variable Documentation

◆ SHA256_DIGEST_SIZE

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