- aes crypter written but not tested

This commit is contained in:
Jan Hutter
2005-11-28 08:22:43 +00:00
parent b241048084
commit 363a7dab5e
3 changed files with 1609 additions and 12 deletions
File diff suppressed because it is too large Load Diff
@@ -5,6 +5,21 @@
*
*/
/*
* Copyright (C) 2001 Dr B. R. Gladman <[email protected]>
* Copyright (C) 2005 Jan Hutter, Martin Willi
* Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#ifndef _AES_CRYPTER_H_
#define _AES_CRYPTER_H_
@@ -39,12 +54,14 @@ struct aes_crypter_t {
/**
* @brief Constructor to create aes_crypter_t objects.
*
* @param blocksize block size of AES crypter
* (16, 24 or 32 are supported)
* Default size is set to 16.
* @return
* - aes_crypter_t if successfully
* - NULL if out of ressources
*/
aes_crypter_t *aes_crypter_create();
aes_crypter_t *aes_crypter_create(size_t blocksize);
#endif //_AES_CRYPTER_H_
+4 -2
View File
@@ -66,11 +66,12 @@ struct crypter_t {
*
* @param this calling crypter
* @param data data to encrypt
* @param iv iv
* @param [out]encrypted pointer where the encrypted bytes will be written
* @return
* - SUCCESS in any case
*/
status_t (*encrypt) (crypter_t *this, chunk_t data, chunk_t *encrypted);
status_t (*encrypt) (crypter_t *this, chunk_t data, chunk_t iv, chunk_t *encrypted);
/**
* @brief Decrypt a chunk of data and allocate space for
@@ -78,11 +79,12 @@ struct crypter_t {
*
* @param this calling crypter
* @param data data to decrypt
* @param iv iv
* @param [out]encrypted pointer where the decrypted bytes will be written
* @return
* - SUCCESS in any case
*/
status_t (*decrypt) (crypter_t *this, chunk_t data, chunk_t *decrypted);
status_t (*decrypt) (crypter_t *this, chunk_t data, chunk_t iv, chunk_t *decrypted);
/**
* @brief get the block size of this crypter