sha256.h 377 B

12345678910111213141516
  1. #ifndef _SHA256_H
  2. #define _SHA256_H
  3. #define SHA256_SUM_LEN 32
  4. typedef struct {
  5. uint32_t total[2];
  6. uint32_t state[8];
  7. uint8_t buffer[64];
  8. } sha256_context;
  9. void sha256_starts(sha256_context * ctx);
  10. void sha256_update(sha256_context * ctx, uint8_t * input, uint32_t length);
  11. void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]);
  12. #endif /* _SHA256_H */