Revision 10564,
994 bytes
checked in by danw, 27 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r10563,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | /* |
---|
2 | |
---|
3 | blowfish.h |
---|
4 | |
---|
5 | Author: Mika Kojo |
---|
6 | |
---|
7 | Copyright (c) 1996 SSH Communications Security Oy |
---|
8 | |
---|
9 | Created: Wed May 28 20:25 1996 |
---|
10 | |
---|
11 | The blowfish encryption algorithm, created by Bruce Schneier. |
---|
12 | |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef BLOWFISH_H |
---|
16 | #define BLOWFISH_H |
---|
17 | |
---|
18 | #include "includes.h" |
---|
19 | |
---|
20 | #define MAX_KEY_BYTES 56 |
---|
21 | #define KEYBYTES 8 |
---|
22 | |
---|
23 | typedef struct |
---|
24 | { |
---|
25 | word32 S[4* 256], P[16 + 2]; |
---|
26 | unsigned char iv[8]; |
---|
27 | } BlowfishContext; |
---|
28 | |
---|
29 | /* Prototypes */ |
---|
30 | |
---|
31 | #if 0 |
---|
32 | void blowfish_encrypt(BlowfishContext *context, |
---|
33 | word32 xl, word32 xr, word32 *output); |
---|
34 | |
---|
35 | void blowfish_decrypt(BlowfishContext *context, |
---|
36 | word32 xl, word32 xr, word32 *output); |
---|
37 | #endif |
---|
38 | |
---|
39 | void blowfish_set_key(BlowfishContext *, const unsigned char *, |
---|
40 | short, int); |
---|
41 | |
---|
42 | void blowfish_transform(word32, word32, word32 *, int, |
---|
43 | void *); |
---|
44 | |
---|
45 | void blowfish_cbc_encrypt(BlowfishContext *, unsigned char *, |
---|
46 | const unsigned char *, unsigned int); |
---|
47 | |
---|
48 | void blowfish_cbc_decrypt(BlowfishContext *, unsigned char *, |
---|
49 | const unsigned char *, unsigned int); |
---|
50 | |
---|
51 | #endif |
---|
52 | |
---|
Note: See
TracBrowser
for help on using the repository browser.