NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
crypto.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_UTIL_CRYPTO_HPP
23 #define NDN_UTIL_CRYPTO_HPP
24 
25 #include "../common.hpp"
26 #include "../encoding/buffer.hpp"
27 
28 namespace ndn {
29 
37 void
38 ndn_digestSha256(const uint8_t* data, size_t dataLength, uint8_t* digest);
39 
40 namespace crypto {
41 
43 static const size_t SHA256_DIGEST_SIZE = 32;
44 
53 sha256(const uint8_t* data, size_t dataLength);
54 
55 } // namespace crypto
56 
57 } // namespace ndn
58 
59 #endif // NDN_UTIL_CRYPTO_HPP
Copyright (c) 2011-2015 Regents of the University of California.
void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest)
Compute the sha-256 digest of data.
Definition: crypto.cpp:30
static const size_t SHA256_DIGEST_SIZE
number of octets in a SHA256 digest
Definition: crypto.hpp:43
shared_ptr< const Buffer > ConstBufferPtr
Definition: buffer.hpp:33
ConstBufferPtr sha256(const uint8_t *data, size_t dataLength)
Compute the sha-256 digest of data.
Definition: crypto.cpp:51