kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

sha256.h (334B)


      1 #ifndef KIT_SHA256_H
      2 #define KIT_SHA256_H
      3 
      4 #include "core/core.h"
      5 
      6 #define SHA256_DIGEST_LEN 32u
      7 
      8 typedef struct Sha256 {
      9   u32 h[8];
     10   u8 buf[64];
     11   u32 buflen;
     12   u64 total;
     13 } Sha256;
     14 
     15 void sha256_init(Sha256* s);
     16 void sha256_update(Sha256* s, const u8* data, u32 n);
     17 void sha256_final(Sha256* s, u8 out[SHA256_DIGEST_LEN]);
     18 
     19 #endif