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 | #include "crypto.h" |
| 8 | |
Jeff Thompson | 10ad12a | 2013-09-24 16:19:11 -0700 | [diff] [blame^] | 9 | 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] | 10 | { |
| 11 | SHA256_CTX sha256; |
| 12 | SHA256_Init(&sha256); |
| 13 | SHA256_Update(&sha256, data, dataLength); |
| 14 | SHA256_Final(digest, &sha256); |
| 15 | } |