Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

aes.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2002, 2003 Bob Deblier
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  */
00019 
00026 #ifndef _AES_H
00027 #define _AES_H
00028 
00029 #include "beecrypt/beecrypt.h"
00030 #include "beecrypt/aesopt.h"
00031 
00035 #ifdef __cplusplus
00036 struct BEECRYPTAPI aesParam
00037 #else
00038 struct _aesParam
00039 #endif
00040 {
00044     uint32_t k[64];
00048     uint32_t nr;
00052     uint32_t fdback[4];
00053 };
00054 
00055 #ifndef __cplusplus
00056 typedef struct _aesParam aesParam;
00057 #endif
00058 
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif
00062 
00066 extern const BEECRYPTAPI blockCipher aes;
00067 
00078 BEECRYPTAPI
00079 int         aesSetup   (aesParam* ap, const byte* key, size_t keybits, cipherOperation op);
00080 
00088 BEECRYPTAPI
00089 int         aesSetIV   (aesParam* ap, const byte* iv);
00090 
00099 BEECRYPTAPI
00100 int         aesEncrypt (aesParam* ap, uint32_t* dst, const uint32_t* src);
00101 
00110 BEECRYPTAPI
00111 int         aesDecrypt (aesParam* ap, uint32_t* dst, const uint32_t* src);
00112 
00113 BEECRYPTAPI
00114 uint32_t*   aesFeedback(aesParam* ap);
00115 
00116 #ifdef __cplusplus
00117 }
00118 #endif
00119 
00120 #endif

Generated on Mon Jun 20 10:09:20 2005 for BeeCrypt by  doxygen 1.4.0