blob: 2cdc91b9c920f46192fae44ba6f93df25ae5ad5b [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#include "crypto.h"
8
Jeff Thompson10ad12a2013-09-24 16:19:11 -07009void ndn_digestSha256(const uint8_t *data, unsigned int dataLength, uint8_t *digest)
Jeff Thompson3af7e792013-08-23 14:22:11 -070010{
11 SHA256_CTX sha256;
12 SHA256_Init(&sha256);
13 SHA256_Update(&sha256, data, dataLength);
14 SHA256_Final(digest, &sha256);
15}