All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
crypto.hpp
Go to the documentation of this file.
1 
6 #ifndef NDN_UTIL_CRYPTO_HPP
7 #define NDN_UTIL_CRYPTO_HPP
8 
9 #include "../common.hpp"
10 #include "../encoding/buffer.hpp"
11 
12 namespace ndn {
13 
21 void ndn_digestSha256(const uint8_t* data, size_t dataLength, uint8_t* digest);
22 
23 namespace crypto {
24 
26 static const size_t SHA256_DIGEST_SIZE = 32;
27 
36 sha256(const uint8_t* data, size_t dataLength);
37 
38 } // namespace crypto
39 
40 } // namespace ndn
41 
42 #endif // NDN_UTIL_CRYPTO_HPP
void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest)
Compute the sha-256 digest of data.
Definition: crypto.cpp:13
static const size_t SHA256_DIGEST_SIZE
number of octets in a SHA256 digest
Definition: crypto.hpp:26
ptr_lib::shared_ptr< const Buffer > ConstBufferPtr
Definition: buffer.hpp:17
ConstBufferPtr sha256(const uint8_t *data, size_t dataLength)
Compute the sha-256 digest of data.
Definition: crypto.cpp:33