2024-09-01 17:04:36 +00:00
|
|
|
#ifndef __RIPEMD160_H__
|
|
|
|
#define __RIPEMD160_H__
|
2013-09-15 23:32:56 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
2024-09-01 17:04:36 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#define RIPEMD160_BLOCK_LENGTH 64
|
|
|
|
#define RIPEMD160_DIGEST_LENGTH 20
|
2013-09-15 23:32:56 +00:00
|
|
|
|
2024-09-01 16:47:45 +00:00
|
|
|
typedef struct {
|
|
|
|
uint64_t length;
|
|
|
|
union {
|
|
|
|
uint32_t w[16];
|
|
|
|
uint8_t b[64];
|
|
|
|
} buf;
|
|
|
|
uint32_t h[5];
|
|
|
|
uint8_t bufpos;
|
|
|
|
} ripemd160_state;
|
2016-11-01 15:32:44 +00:00
|
|
|
|
2024-09-01 17:04:36 +00:00
|
|
|
void ripemd160_init(ripemd160_state * self);
|
|
|
|
void ripemd160_process(ripemd160_state * self, const uint8_t *in, size_t length);
|
|
|
|
void ripemd160_done(ripemd160_state * self, uint8_t out[RIPEMD160_DIGEST_LENGTH]);
|
|
|
|
void ripemd160(const uint8_t *in, size_t length, uint8_t out[RIPEMD160_DIGEST_LENGTH]);
|
2013-09-15 23:32:56 +00:00
|
|
|
#endif
|