dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / lib / libcrypto / whrlpool / whrlpool.h
blob875d34f7d336d52202957a15104f7e67fea1baab
1 /* $OpenBSD: whrlpool.h,v 1.5 2014/07/10 22:45:58 jsing Exp $ */
3 #include <stddef.h>
5 #ifndef HEADER_WHRLPOOL_H
6 #define HEADER_WHRLPOOL_H
8 #include <openssl/opensslconf.h>
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
14 #define WHIRLPOOL_DIGEST_LENGTH (512/8)
15 #define WHIRLPOOL_BBLOCK 512
16 #define WHIRLPOOL_COUNTER (256/8)
18 typedef struct {
19 union {
20 unsigned char c[WHIRLPOOL_DIGEST_LENGTH];
21 /* double q is here to ensure 64-bit alignment */
22 double q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)];
23 } H;
24 unsigned char data[WHIRLPOOL_BBLOCK/8];
25 unsigned int bitoff;
26 size_t bitlen[WHIRLPOOL_COUNTER/sizeof(size_t)];
27 } WHIRLPOOL_CTX;
29 #ifndef OPENSSL_NO_WHIRLPOOL
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
37 #ifdef __cplusplus
39 #endif
41 #endif