2013-09-15 23:32:56 +00:00
|
|
|
#ifndef __RIPEMD160_H__
|
|
|
|
#define __RIPEMD160_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2019-03-29 14:44:55 +00:00
|
|
|
#define RIPEMD160_BLOCK_LENGTH 64
|
|
|
|
#define RIPEMD160_DIGEST_LENGTH 20
|
2016-11-01 15:32:44 +00:00
|
|
|
|
2016-04-14 08:58:08 +00:00
|
|
|
typedef struct _RIPEMD160_CTX {
|
2019-03-29 14:44:55 +00:00
|
|
|
uint32_t total[2]; /*!< number of bytes processed */
|
|
|
|
uint32_t state[5]; /*!< intermediate digest state */
|
|
|
|
uint8_t buffer[RIPEMD160_BLOCK_LENGTH]; /*!< data block being processed */
|
2016-04-14 08:58:08 +00:00
|
|
|
} RIPEMD160_CTX;
|
|
|
|
|
2016-04-14 15:28:46 +00:00
|
|
|
void ripemd160_Init(RIPEMD160_CTX *ctx);
|
|
|
|
void ripemd160_Update(RIPEMD160_CTX *ctx, const uint8_t *input, uint32_t ilen);
|
2019-03-29 14:44:55 +00:00
|
|
|
void ripemd160_Final(RIPEMD160_CTX *ctx,
|
|
|
|
uint8_t output[RIPEMD160_DIGEST_LENGTH]);
|
|
|
|
void ripemd160(const uint8_t *msg, uint32_t msg_len,
|
|
|
|
uint8_t hash[RIPEMD160_DIGEST_LENGTH]);
|
2013-09-15 23:32:56 +00:00
|
|
|
|
|
|
|
#endif
|