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 | 10ad12a | 2013-09-24 16:19:11 -0700 | [diff] [blame^] | 12 | #include "../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 | 10ad12a | 2013-09-24 16:19:11 -0700 | [diff] [blame^] | 24 | void ndn_digestSha256(const uint8_t *data, unsigned int 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 |