blob: 8908a7600636b4d7728ae0722f2af4a68172d32b [file] [log] [blame]
Jeff Thompson3af7e792013-08-23 14:22:11 -07001/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07002 * Copyright (C) 2013 Regents of the University of California.
3 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompson3af7e792013-08-23 14:22:11 -07004 * See COPYING for copyright and distribution information.
5 */
6
Alexander Afanasyevd409d592014-01-28 18:36:38 -08007#ifndef NDN_UTIL_CRYPTO_HPP
8#define NDN_UTIL_CRYPTO_HPP
9
10#include "ndn-cpp-dev/common.hpp"
Jeff Thompson3af7e792013-08-23 14:22:11 -070011
12#include <openssl/ssl.h>
13#include <openssl/rsa.h>
14
Alexander Afanasyevd409d592014-01-28 18:36:38 -080015namespace ndn {
Jeff Thompson3af7e792013-08-23 14:22:11 -070016
17/**
18 * Compute the sha-256 digest of data.
19 * @param data Pointer to the input byte array.
20 * @param dataLength The length of data.
21 * @param digest A pointer to a buffer of size SHA256_DIGEST_LENGTH to receive the data.
22 */
Jeff Thompson97223af2013-09-24 17:01:27 -070023void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest);
Jeff Thompson3af7e792013-08-23 14:22:11 -070024
Alexander Afanasyevd409d592014-01-28 18:36:38 -080025} // namespace ndn
Jeff Thompson3af7e792013-08-23 14:22:11 -070026
Alexander Afanasyevd409d592014-01-28 18:36:38 -080027#endif // NDN_UTIL_CRYPTO_HPP