File: blowfish.h

package info (click to toggle)
bcrypt 1.1-6
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 260 kB
  • ctags: 212
  • sloc: ansic: 1,370; makefile: 91; sh: 11
file content (21 lines) | stat: -rw-r--r-- 479 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Author     :  Paul Kocher
 * E-mail     :  pck@netcom.com
 * Date       :  1997
 * Description:  C implementation of the Blowfish algorithm.
 */

#define MAXKEYBYTES 56          /* 448 bits */

typedef struct {
  uInt32 P[16 + 2];
  uInt32 S[4][256];
} BLOWFISH_CTX;

void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen);

void Blowfish_Encrypt(BLOWFISH_CTX *ctx, uInt32 *xl, uInt32
*xr);

void Blowfish_Decrypt(BLOWFISH_CTX *ctx, uInt32 *xl, uInt32
*xr);