blob: eb7cec5b26a065f1e83affc317f82bde8f9fa507 [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>
Jeff Thompson10ad12a2013-09-24 16:19:11 -070012#include "../common.h"
Jeff Thompson3af7e792013-08-23 14:22:11 -070013
14#ifdef __cplusplus
15extern "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 Thompson10ad12a2013-09-24 16:19:11 -070024void ndn_digestSha256(const uint8_t *data, unsigned int dataLength, uint8_t *digest);
Jeff Thompson3af7e792013-08-23 14:22:11 -070025
26#ifdef __cplusplus
27}
28#endif
29
30#endif