]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libstrongswan/plugins/aesni/aesni_cbc.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / aesni / aesni_cbc.h
1 /*
2 * Copyright (C) 2015 Martin Willi
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 aesni_cbc aesni_cbc
19 * @{ @ingroup aesni
20 */
21
22 #ifndef AESNI_CBC_H_
23 #define AESNI_CBC_H_
24
25 #include <library.h>
26
27 typedef struct aesni_cbc_t aesni_cbc_t;
28
29 /**
30 * CBC mode crypter using AES-NI
31 */
32 struct aesni_cbc_t {
33
34 /**
35 * Implements crypter interface
36 */
37 crypter_t crypter;
38 };
39
40 /**
41 * Create a aesni_cbc instance.
42 *
43 * @param algo encryption algorithm, AES_ENCR_CBC
44 * @param key_size AES key size, in bytes
45 * @return AES-CBC crypter, NULL if not supported
46 */
47 aesni_cbc_t *aesni_cbc_create(encryption_algorithm_t algo, size_t key_size);
48
49 #endif /** AESNI_CBC_H_ @}*/