Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 1 | /** |
Jeff Thompson | 7687dc0 | 2013-09-13 11:54:07 -0700 | [diff] [blame] | 2 | * Copyright (C) 2013 Regents of the University of California. |
| 3 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
Alexander Afanasyev | d409d59 | 2014-01-28 18:36:38 -0800 | [diff] [blame] | 7 | #ifndef NDN_UTIL_CRYPTO_HPP |
| 8 | #define NDN_UTIL_CRYPTO_HPP |
| 9 | |
Alexander Afanasyev | 1950885 | 2014-01-29 01:01:51 -0800 | [diff] [blame^] | 10 | #include "../common.hpp" |
Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 11 | |
| 12 | #include <openssl/ssl.h> |
| 13 | #include <openssl/rsa.h> |
| 14 | |
Alexander Afanasyev | d409d59 | 2014-01-28 18:36:38 -0800 | [diff] [blame] | 15 | namespace ndn { |
Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 16 | |
| 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 Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 23 | void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest); |
Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 24 | |
Alexander Afanasyev | d409d59 | 2014-01-28 18:36:38 -0800 | [diff] [blame] | 25 | } // namespace ndn |
Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 26 | |
Alexander Afanasyev | d409d59 | 2014-01-28 18:36:38 -0800 | [diff] [blame] | 27 | #endif // NDN_UTIL_CRYPTO_HPP |