]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libstrongswan/plugins/rc2/rc2_crypter.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / rc2 / rc2_crypter.h
1 /*
2 * Copyright (C) 2013 Tobias Brunner
3 *
4 * Copyright (C) secunet Security Networks AG
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 rc2_crypter rc2_crypter
19 * @{ @ingroup rc2_p
20 */
21
22 #ifndef RC2_CRYPTER_H_
23 #define RC2_CRYPTER_H_
24
25 typedef struct rc2_crypter_t rc2_crypter_t;
26
27 #include <crypto/crypters/crypter.h>
28
29 /**
30 * Class implementing the RC2 block cipher as defined in RFC 2268.
31 */
32 struct rc2_crypter_t {
33
34 /**
35 * Implements crypter_t interface.
36 */
37 crypter_t crypter;
38 };
39
40 /**
41 * Constructor to create rc2_crypter_t objects.
42 *
43 * @param algo algorithm to implement (ENCR_RC2_CBC)
44 * @param key_size use the RC2_KEY_SIZE macro if the effective key size
45 * in bits is different than the actual length of the key
46 * @return rc2_crypter_t object, NULL if not supported
47 */
48 rc2_crypter_t *rc2_crypter_create(encryption_algorithm_t algo,
49 size_t key_size);
50
51 #endif /** RC2_CRYPTER_H_ @}*/