]>
Commit | Line | Data |
---|---|---|
d1593e6b | 1 | #ifndef HEADER_WHRLPOOL_H |
ae5c8664 | 2 | # define HEADER_WHRLPOOL_H |
d1593e6b | 3 | |
ae5c8664 MC |
4 | # include <openssl/e_os2.h> |
5 | # include <stddef.h> | |
d1593e6b AP |
6 | |
7 | #ifdef __cplusplus | |
8 | extern "C" { | |
9 | #endif | |
10 | ||
ae5c8664 MC |
11 | # define WHIRLPOOL_DIGEST_LENGTH (512/8) |
12 | # define WHIRLPOOL_BBLOCK 512 | |
13 | # define WHIRLPOOL_COUNTER (256/8) | |
d1593e6b | 14 | |
ae5c8664 MC |
15 | typedef struct { |
16 | union { | |
17 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; | |
18 | /* double q is here to ensure 64-bit alignment */ | |
19 | double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; | |
20 | } H; | |
21 | unsigned char data[WHIRLPOOL_BBLOCK / 8]; | |
22 | unsigned int bitoff; | |
23 | size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; | |
24 | } WHIRLPOOL_CTX; | |
d1593e6b | 25 | |
ae5c8664 MC |
26 | # ifndef OPENSSL_NO_WHIRLPOOL |
27 | # ifdef OPENSSL_FIPS | |
65300dcf | 28 | int private_WHIRLPOOL_Init(WHIRLPOOL_CTX *c); |
ae5c8664 MC |
29 | # endif |
30 | int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); | |
31 | int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); | |
32 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); | |
33 | int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); | |
34 | unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); | |
35 | # endif | |
d1593e6b AP |
36 | |
37 | #ifdef __cplusplus | |
38 | } | |
39 | #endif | |
40 | ||
41 | #endif |