1 #ifndef SHA256_NETTLE_H
2 #define SHA256_NETTLE_H
4 #include <nettle/sha2.h>
6 typedef struct sha256_ctx nettle_SHA256_CTX
;
8 static inline void nettle_SHA256_Init(nettle_SHA256_CTX
*ctx
)
13 static inline void nettle_SHA256_Update(nettle_SHA256_CTX
*ctx
,
17 sha256_update(ctx
, len
, data
);
20 static inline void nettle_SHA256_Final(unsigned char *digest
,
21 nettle_SHA256_CTX
*ctx
)
23 sha256_digest(ctx
, SHA256_DIGEST_SIZE
, digest
);
26 #define platform_SHA256_CTX nettle_SHA256_CTX
27 #define platform_SHA256_Init nettle_SHA256_Init
28 #define platform_SHA256_Update nettle_SHA256_Update
29 #define platform_SHA256_Final nettle_SHA256_Final