blob: 43d47ebae213ae9ccd8758ac6a0b2ec48f811da2 [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>
Yingdi Yu61ec2722014-01-20 14:22:32 -080012#include <ndn-cpp-dev/c/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 Thompson97223af2013-09-24 17:01:27 -070024void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest);
Jeff Thompson3af7e792013-08-23 14:22:11 -070025
26#ifdef __cplusplus
27}
28#endif
29
30#endif