1
0

sha256.hpp 333 B

1234567891011121314151617
  1. #ifndef _RAR_SHA256_
  2. #define _RAR_SHA256_
  3. #define SHA256_DIGEST_SIZE 32
  4. typedef struct
  5. {
  6. uint32 H[8];
  7. uint64 Count;
  8. byte Buffer[64];
  9. } sha256_context;
  10. void sha256_init(sha256_context *ctx);
  11. void sha256_process(sha256_context *ctx, const void *Data, size_t Size);
  12. void sha256_done(sha256_context *ctx, byte *Digest);
  13. #endif