1 /* License: public domain -or- http://www.wtfpl.net/txt/copying/ */
13 #define SHA256_DIGEST_LENGTH 32
15 typedef struct SHA256_CTX
{
17 uint32_t state
[8], curlen
;
18 unsigned char buf
[64];
19 /*const void *data; */
22 /* return value is non-zero/non-NULL on success */
23 extern int SHA256_Init(SHA256_CTX
*c
);
24 extern int SHA256_Update(SHA256_CTX
*c
, const void *data
, size_t len
);
25 extern int SHA256_Final(unsigned char *md
, SHA256_CTX
*c
);
26 extern unsigned char *SHA256(const void *data
, size_t len
, unsigned char *md
);