1 #ifndef HEADER_WHRLPOOL_H
2 # define HEADER_WHRLPOOL_H
4 #include <openssl/opensslconf.h>
6 # ifndef OPENSSL_NO_WHIRLPOOL
7 # include <openssl/e_os2.h>
13 # define WHIRLPOOL_DIGEST_LENGTH (512/8)
14 # define WHIRLPOOL_BBLOCK 512
15 # define WHIRLPOOL_COUNTER (256/8)
19 unsigned char c[WHIRLPOOL_DIGEST_LENGTH];
20 /* double q is here to ensure 64-bit alignment */
21 double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)];
23 unsigned char data[WHIRLPOOL_BBLOCK / 8];
25 size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)];
28 int WHIRLPOOL_Init(WHIRLPOOL_CTX *c);
29 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes);
30 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits);
31 int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c);
32 unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md);