sha1.hpp 449 B

1234567891011121314151617181920
  1. #ifndef _RAR_SHA1_
  2. #define _RAR_SHA1_
  3. #define HW 5
  4. typedef struct {
  5. uint32 state[5];
  6. uint32 count[2];
  7. unsigned char buffer[64];
  8. unsigned char workspace[64]; // Temporary buffer.
  9. } hash_context;
  10. void hash_initial( hash_context * c );
  11. void hash_process( hash_context * c, unsigned char * data, size_t len,
  12. bool handsoff);
  13. void hash_final( hash_context * c, uint32[HW], bool handsoff);
  14. #endif