Deleted Added
full compact
blowfish.h (55009) blowfish.h (62587)
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 $ */
3
1/* crypto/bf/blowfish.h */
2/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@mincom.oz.au).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

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

49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
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.
11 *

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

52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 * SUCH DAMAGE.
55 *
56 * The licence and distribution terms for any publically available version or
57 * derivative of this code cannot be changed. i.e. this code cannot simply be
58 * copied and put under another distribution licence
59 * [including the GNU Public Licence.]
57 *
58 * $FreeBSD: head/sys/crypto/blowfish/blowfish.h 55009 1999-12-22 19:13:38Z shin $
59 */
60
61#ifndef HEADER_BLOWFISH_H
60 */
61
62#ifndef HEADER_BLOWFISH_H
62#define HEADER_BLOWFISH_H
63#define HEADER_BLOWFISH_H
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
68#define BF_ENCRYPT 1
69#define BF_DECRYPT 0
69#define BF_ENCRYPT 1
70#define BF_DECRYPT 0
70
71/* If you make this 'unsigned int' the pointer variants will work on
72 * the Alpha, otherwise they will not. Strangly using the '8 byte'
73 * BF_LONG and the default 'non-pointer' inner loop is the best configuration
74 * for the Alpha */
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 */
75#define BF_LONG unsigned long
76#define BF_LONG unsigned long
76
77
77#define BF_ROUNDS 16
78#define BF_BLOCK 8
78#define BF_ROUNDS 16
79#define BF_BLOCK 8
79
80typedef struct bf_key_st
81 {
82 BF_LONG P[BF_ROUNDS+2];
83 BF_LONG S[4*256];
84 } BF_KEY;
85
86#ifndef NOPROTO

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

94void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
95 BF_KEY *schedule, unsigned char *ivec, int *num, int encrypt);
96void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
97 BF_KEY *schedule, unsigned char *ivec, int *num);
98char *BF_options(void);
99
100/* added by itojun */
101struct mbuf;
80
81typedef struct bf_key_st
82 {
83 BF_LONG P[BF_ROUNDS+2];
84 BF_LONG S[4*256];
85 } BF_KEY;
86
87#ifndef NOPROTO

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

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;
102void BF_cbc_encrypt_m(struct mbuf *, int, int, BF_KEY *,
103 unsigned char *, int);
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();

--- 13 unchanged lines hidden ---
104
105#else
106
107void BF_set_key();
108void BF_ecb_encrypt();
109void BF_encrypt();
110void BF_cbc_encrypt();
111void BF_cfb64_encrypt();

--- 13 unchanged lines hidden ---