1 #ifndef BGLIBS__SHA256__H__ 2 #define BGLIBS__SHA256__H__ 3 4 #include "sysdeps.h" 5 6 #define SHA256_DIGEST_LENGTH (256/8) 7 8 typedef struct { 9 uint32 H[8]; 10 uint64 bytes; 11 uint8 M[64]; 12 } SHA256_ctx; 13 14 void SHA256_init(SHA256_ctx*); 15 void SHA256_update(SHA256_ctx*, const void*, unsigned long); 16 void SHA256_final(SHA256_ctx*, uint8*); 17 18 #endif 19