BeeCrypt
4.2.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
beecrypt
blowfish.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 1999, 2000, 2002 X-Way Rights BV
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
*/
19
34
#ifndef _BLOWFISH_H
35
#define _BLOWFISH_H
36
37
#include "
beecrypt/beecrypt.h
"
38
#include "
beecrypt/blowfishopt.h
"
39
40
#define BLOWFISHROUNDS 16
41
#define BLOWFISHPSIZE (BLOWFISHROUNDS+2)
42
46
#ifdef __cplusplus
47
struct
BEECRYPTAPI
blowfishParam
48
#else
49
struct _blowfishParam
50
#endif
51
{
55
uint32_t p[
BLOWFISHPSIZE
];
59
uint32_t s[1024];
63
uint32_t fdback[2];
64
};
65
66
#ifndef __cplusplus
67
typedef
struct
_blowfishParam
blowfishParam
;
68
#endif
69
70
#ifdef __cplusplus
71
extern
"C"
{
72
#endif
73
77
extern
const
BEECRYPTAPI
blockCipher
blowfish
;
78
89
BEECRYPTAPI
90
int
blowfishSetup
(
blowfishParam
*,
const
byte
*,
size_t
,
cipherOperation
);
91
99
BEECRYPTAPI
100
int
blowfishSetIV
(
blowfishParam
*,
const
byte
* iv);
101
102
BEECRYPTAPI
103
int
blowfishSetCTR
(
blowfishParam
*,
const
byte
* nivz,
size_t
counter);
104
113
BEECRYPTAPI
114
int
blowfishEncrypt
(
blowfishParam
*, uint32_t*,
const
uint32_t*);
115
124
BEECRYPTAPI
125
int
blowfishDecrypt
(
blowfishParam
*, uint32_t*,
const
uint32_t*);
126
127
BEECRYPTAPI
128
uint32_t*
blowfishFeedback
(
blowfishParam
*);
129
130
#ifdef __cplusplus
131
}
132
#endif
133
134
#endif
Generated by
1.8.3.1