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


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


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

Function Documentation

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

Compute the sha-256 digest of data.

dataPointer to the input byte array.
dataLengthThe length of data.
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::importIdentity(), ndn::security::KeyChain::signWithSha256(), and ndn::Validator::verifySignature().

Variable Documentation

const size_t ndn::crypto::SHA256_DIGEST_SIZE = 32