- aes crypter written but not tested
[strongswan.git] / Source / charon / transforms / crypters / aes_crypter.h
1 /**
2 * @file aes_crypter.h
3 *
4 * @brief Interface of aes_crypter_t
5 *
6 */
7
8 /*
9 * Copyright (C) 2001 Dr B. R. Gladman <brg@gladman.uk.net>
10 * Copyright (C) 2005 Jan Hutter, Martin Willi
11 * Hochschule fuer Technik Rapperswil
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 */
23
24 #ifndef _AES_CRYPTER_H_
25 #define _AES_CRYPTER_H_
26
27 #include <transforms/crypters/crypter.h>
28
29
30 typedef struct aes_crypter_t aes_crypter_t;
31
32 /**
33 * @brief Class implementing the AES symmetric encryption algorithm.
34 *
35 * @ingroup crypters
36 */
37 struct aes_crypter_t {
38
39 /**
40 * crypter_t interface.
41 */
42 crypter_t crypter_interface;
43
44 /**
45 * @brief Destroys a aes_crypter_t object.
46 *
47 * @param this crypter_t object to destroy
48 * @return
49 * - SUCCESS in any case
50 */
51 status_t (*destroy) (aes_crypter_t *this);
52 };
53
54 /**
55 * @brief Constructor to create aes_crypter_t objects.
56 *
57 * @param blocksize block size of AES crypter
58 * (16, 24 or 32 are supported)
59 * Default size is set to 16.
60 * @return
61 * - aes_crypter_t if successfully
62 * - NULL if out of ressources
63 */
64 aes_crypter_t *aes_crypter_create(size_t blocksize);
65
66
67 #endif //_AES_CRYPTER_H_