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 | |
| 7 | #ifndef NDN_CRYPTO_H |
| 8 | #define NDN_CRYPTO_H |
| 9 | |
| 10 | #include <openssl/ssl.h> |
| 11 | #include <openssl/rsa.h> |
Jeff Thompson | 25b4e61 | 2013-10-10 16:03:24 -0700 | [diff] [blame] | 12 | #include <ndn-cpp/c/common.h> |
Jeff Thompson | 3af7e79 | 2013-08-23 14:22:11 -0700 | [diff] [blame] | 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | /** |
| 19 | * Compute the sha-256 digest of data. |
| 20 | * @param data Pointer to the input byte array. |
| 21 | * @param dataLength The length of data. |
| 22 | * @param digest A pointer to a buffer of size SHA256_DIGEST_LENGTH to receive the data. |
| 23 | */ |
Jeff Thompson | 97223af | 2013-09-24 17:01:27 -0700 | [diff] [blame] | 24 | 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] | 25 | |
| 26 | #ifdef __cplusplus |
| 27 | } |
| 28 | #endif |
| 29 | |
| 30 | #endif |