blob: 9dea5b0bae0c2fd9fc5133d5b971e19be2974b38 [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
7#ifndef NDN_CRYPTO_H
8#define NDN_CRYPTO_H
9
10#include <openssl/ssl.h>
11#include <openssl/rsa.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
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 */
23void ndn_digestSha256(const unsigned char *data, unsigned int dataLength, unsigned char *digest);
24
25#ifdef __cplusplus
26}
27#endif
28
29#endif