19ea6b4b7a54e3eea959bfdb30cc9122675fdf4e
[strongswan.git] / src / libstrongswan / plugins / aes / aes_crypter.h
1 /*
2 * Copyright (C) 2005-2008 Martin Willi
3 * Copyright (C) 2005 Jan Hutter
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup aes_crypter aes_crypter
19 * @{ @ingroup aes_p
20 */
21
22 #ifndef AES_CRYPTER_H_
23 #define AES_CRYPTER_H_
24
25 typedef struct aes_crypter_t aes_crypter_t;
26
27 #include <crypto/crypters/crypter.h>
28
29 /**
30 * Class implementing the AES encryption algorithm.
31 */
32 struct aes_crypter_t {
33
34 /**
35 * The crypter_t interface.
36 */
37 crypter_t crypter_interface;
38 };
39
40 /**
41 * Constructor to create aes_crypter_t objects.
42 *
43 * @param key_size key size in bytes
44 * @param algo algorithm to implement
45 * @return aes_crypter_t object, NULL if not supported
46 */
47 aes_crypter_t *aes_crypter_create(encryption_algorithm_t algo,
48 size_t key_size);
49
50 #endif /** AES_CRYPTER_H_ @}*/