crypto.h
1 
21 #ifndef NDN_CRYPTO_H
22 #define NDN_CRYPTO_H
23 
24 #include <ndn-cpp/c/common.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 struct ndn_EcKeyInfo {
34  int keySize;
35  int curveId;
36  int *oidIntegerList;
37  size_t oidIntegerListLength;
38 };
39 
47 void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest);
48 
59 void
60 ndn_computeHmacWithSha256
61  (const uint8_t *key, size_t keyLength, const uint8_t *data, size_t dataLength,
62  uint8_t *digest);
63 
69 void
70 ndn_generateRandomBytes(uint8_t *buffer, size_t bufferLength);
71 
76 size_t
77 ndn_getEcKeyInfoCount();
78 
85 const struct ndn_EcKeyInfo *
86 ndn_getEcKeyInfo(int i);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif
Copyright (C) 2013-2016 Regents of the University of California.
Definition: crypto.h:33