]> matita.cs.unibo.it Git - pkg-cerco/frama-c-cost-plugin.git/blob - plugin/tests/fail/blowfish.h
Imported Upstream version 0.1
[pkg-cerco/frama-c-cost-plugin.git] / plugin / tests / fail / blowfish.h
1 /*\r
2  * Author     :  Paul Kocher\r
3  * E-mail     :  pck@netcom.com\r
4  * Date       :  1997\r
5  * Description:  C implementation of the Blowfish algorithm.\r
6  */\r
7 \r
8 #define MAXKEYBYTES 56          /* 448 bits */\r
9 \r
10 \r
11 \r
12 typedef struct {\r
13 \r
14   unsigned long P[16 + 2];\r
15 \r
16   unsigned long S[4][256];\r
17 \r
18 } BLOWFISH_CTX;\r
19 \r
20 \r
21 \r
22 void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen);\r
23 \r
24 void Blowfish_Encrypt(BLOWFISH_CTX *ctx, unsigned long *xl, unsigned long\r
25 *xr);\r
26 \r
27 void Blowfish_Decrypt(BLOWFISH_CTX *ctx, unsigned long *xl, unsigned long\r
28 *xr);\r
29 \r
30 int Blowfish_Test(BLOWFISH_CTX *ctx);       /* 0=ok, -1=bad */\r
31 \r
32 \r
33 \r
34 \r
35 \r