Deleted Added
sdiff udiff text old ( 55009 ) new ( 62587 )
full compact
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.]
57 *
58 * $FreeBSD: head/sys/crypto/blowfish/blowfish.h 55009 1999-12-22 19:13:38Z shin $
59 */
60
61#ifndef HEADER_BLOWFISH_H
62#define HEADER_BLOWFISH_H
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68#define BF_ENCRYPT 1
69#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 */
75#define BF_LONG unsigned long
76
77#define BF_ROUNDS 16
78#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;
102void BF_cbc_encrypt_m(struct mbuf *, int, int, BF_KEY *,
103 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 ---