Deleted Added
full compact
blowfish.h (63249) blowfish.h (78064)
1/* $FreeBSD: head/sys/crypto/blowfish/blowfish.h 62587 2000-07-04 16:35:15Z itojun $ */
2/* $KAME: blowfish.h,v 1.4 2000/06/14 10:41:16 itojun Exp $ */
1/* $FreeBSD: head/sys/crypto/blowfish/blowfish.h 78064 2001-06-11 12:39:29Z ume $ */
2/* $KAME: blowfish.h,v 1.10 2000/09/18 21:21:20 itojun Exp $ */
3
4/* crypto/bf/blowfish.h */
5/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
6 * All rights reserved.
7 *
8 * This package is an SSL implementation written
9 * by Eric Young (eay@mincom.oz.au).
10 * The implementation was written so as to conform with Netscapes SSL.

--- 53 unchanged lines hidden (view full) ---

64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69#define BF_ENCRYPT 1
70#define BF_DECRYPT 0
71
3
4/* crypto/bf/blowfish.h */
5/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
6 * All rights reserved.
7 *
8 * This package is an SSL implementation written
9 * by Eric Young (eay@mincom.oz.au).
10 * The implementation was written so as to conform with Netscapes SSL.

--- 53 unchanged lines hidden (view full) ---

64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69#define BF_ENCRYPT 1
70#define BF_DECRYPT 0
71
72/* If you make this 'unsigned int' the pointer variants will work on
73 * the Alpha, otherwise they will not. Strangly using the '8 byte'
74 * BF_LONG and the default 'non-pointer' inner loop is the best configuration
75 * for the Alpha */
76#define BF_LONG unsigned long
72/* must be 32bit quantity */
73#define BF_LONG u_int32_t
77
78#define BF_ROUNDS 16
79#define BF_BLOCK 8
80
74
75#define BF_ROUNDS 16
76#define BF_BLOCK 8
77
81typedef struct bf_key_st
82 {
78typedef struct bf_key_st {
83 BF_LONG P[BF_ROUNDS+2];
84 BF_LONG S[4*256];
79 BF_LONG P[BF_ROUNDS+2];
80 BF_LONG S[4*256];
85 } BF_KEY;
81} BF_KEY;
86
82
87#ifndef NOPROTO
88
89void BF_set_key(BF_KEY *key, int len, unsigned char *data);
90void BF_ecb_encrypt(unsigned char *in,unsigned char *out,BF_KEY *key,
91 int encrypt);
92void BF_encrypt(BF_LONG *data,BF_KEY *key,int encrypt);
93void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
94 BF_KEY *ks, unsigned char *iv, int encrypt);
95void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
96 BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt);
97void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
98 BF_KEY *schedule, unsigned char *ivec, int *num);
99char *BF_options(void);
100
101/* added by itojun */
102struct mbuf;
103int BF_cbc_encrypt_m(struct mbuf *, int, int, BF_KEY *, unsigned char *, int);
104
105#else
106
107void BF_set_key();
108void BF_ecb_encrypt();
109void BF_encrypt();
110void BF_cbc_encrypt();
111void BF_cfb64_encrypt();
112void BF_ofb64_encrypt();
113char *BF_options();
114
115/* added by itojun */
116void BF_cbc_encrypt_m();
117
118#endif
119
83void BF_set_key __P((BF_KEY *, int, unsigned char *));
84void BF_encrypt __P((BF_LONG *, BF_KEY *, int));
120#ifdef __cplusplus
121}
122#endif
123
124#endif
85#ifdef __cplusplus
86}
87#endif
88
89#endif