indextext.html: add notice about upcoming ssh host key change
[girocco.git] / src / lt256.h
blob8c7584ac7ac1fdd664f6a00f00c625aec64b8c06
1 /* License: public domain -or- http://www.wtfpl.net/txt/copying/ */
3 #ifndef LT256_H
4 #define LT256_H
6 #include <stddef.h>
7 #include <stdint.h>
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 #define SHA256_DIGEST_LENGTH 32
15 typedef struct SHA256_CTX {
16 uint64_t length;
17 uint32_t state[8], curlen;
18 unsigned char buf[64];
19 /*const void *data; */
20 } SHA256_CTX;
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);
28 #ifdef __cplusplus
30 #endif
32 #endif /* LT256_H */