OSDN Git Service

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