- some improvements to new asn1 stuff
[strongswan.git] / Source / lib / crypto / crypters / aes_cbc_crypter.h
1 /**
2 * @file aes_cbc_crypter.h
3 *
4 * @brief Interface of aes_cbc_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_CBC_CRYPTER_H_
25 #define AES_CBC_CRYPTER_H_
26
27 #include <crypto/crypters/crypter.h>
28
29
30 typedef struct aes_cbc_crypter_t aes_cbc_crypter_t;
31
32 /**
33 * @brief Class implementing the AES symmetric encryption algorithm.
34 *
35 * @b Constructors:
36 * - aes_cbc_crypter_create()
37 *
38 * @ingroup crypters
39 */
40 struct aes_cbc_crypter_t {
41
42 /**
43 * The crypter_t interface.
44 */
45 crypter_t crypter_interface;
46 };
47
48 /**
49 * @brief Constructor to create aes_cbc_crypter_t objects.
50 *
51 * Supported key sizes are: 16, 24 or 32.
52 *
53 * @param key_size key size in bytes
54 * @return
55 * - aes_cbc_crypter_t object
56 * - NULL if key size not supported
57 */
58 aes_cbc_crypter_t *aes_cbc_crypter_create(size_t key_size);
59
60
61 #endif /* AES_CBC_CRYPTER_H_ */