ripemd160.h 690 B

1234567891011121314151617181920
  1. #ifndef __RIPEMD160_H__
  2. #define __RIPEMD160_H__
  3. #include <stdint.h>
  4. #define RIPEMD160_BLOCK_LENGTH 64
  5. #define RIPEMD160_DIGEST_LENGTH 20
  6. typedef struct _RIPEMD160_CTX {
  7. uint32_t total[2]; /*!< number of bytes processed */
  8. uint32_t state[5]; /*!< intermediate digest state */
  9. uint8_t buffer[RIPEMD160_BLOCK_LENGTH]; /*!< data block being processed */
  10. } RIPEMD160_CTX;
  11. void ripemd160_Init(RIPEMD160_CTX* ctx);
  12. void ripemd160_Update(RIPEMD160_CTX* ctx, const uint8_t* input, uint32_t ilen);
  13. void ripemd160_Final(RIPEMD160_CTX* ctx, uint8_t output[RIPEMD160_DIGEST_LENGTH]);
  14. void ripemd160(const uint8_t* msg, uint32_t msg_len, uint8_t hash[RIPEMD160_DIGEST_LENGTH]);
  15. #endif