BeeCrypt
4.2.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
beecrypt
aes.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2002, 2003 Bob Deblier
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
26
#ifndef _AES_H
27
#define _AES_H
28
29
#include "
beecrypt/beecrypt.h
"
30
#include "
beecrypt/aesopt.h
"
31
35
#ifdef __cplusplus
36
struct
BEECRYPTAPI
aesParam
37
#else
38
struct _aesParam
39
#endif
40
{
44
uint32_t k[64];
48
uint32_t
nr
;
52
uint32_t fdback[4];
53
};
54
55
#ifndef __cplusplus
56
typedef
struct
_aesParam
aesParam
;
57
#endif
58
59
#ifdef __cplusplus
60
extern
"C"
{
61
#endif
62
66
extern
const
BEECRYPTAPI
blockCipher
aes
;
67
78
BEECRYPTAPI
79
int
aesSetup
(
aesParam
* ap,
const
byte
* key,
size_t
keybits,
cipherOperation
op);
80
88
BEECRYPTAPI
89
int
aesSetIV
(
aesParam
* ap,
const
byte
* iv);
90
99
BEECRYPTAPI
100
int
aesSetCTR
(
aesParam
* ap,
const
byte
* nivz,
size_t
counter);
101
110
BEECRYPTAPI
111
int
aesEncrypt
(
aesParam
* ap, uint32_t* dst,
const
uint32_t* src);
112
121
BEECRYPTAPI
122
int
aesDecrypt
(
aesParam
* ap, uint32_t* dst,
const
uint32_t* src);
123
124
BEECRYPTAPI
125
uint32_t*
aesFeedback
(
aesParam
* ap);
126
127
#ifdef __cplusplus
128
}
129
#endif
130
131
#endif
Generated by
1.8.4