]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libstrongswan/plugins/af_alg/af_alg_crypter.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / plugins / af_alg / af_alg_crypter.h
1 /*
2 * Copyright (C) 2010 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 af_alg_crypter af_alg_crypter
19 * @{ @ingroup af_alg
20 */
21
22 #ifndef AF_ALG_CRYPTER_H_
23 #define AF_ALG_CRYPTER_H_
24
25 typedef struct af_alg_crypter_t af_alg_crypter_t;
26
27 #include <plugins/plugin.h>
28 #include <crypto/crypters/crypter.h>
29
30 /** Number of crypters */
31 #define AF_ALG_CRYPTER 28
32
33 /**
34 * Implementation of signers using AF_ALG.
35 */
36 struct af_alg_crypter_t {
37
38 /**
39 * The crypter_t interface.
40 */
41 crypter_t crypter;
42 };
43
44 /**
45 * Constructor to create af_alg_crypter_t.
46 *
47 * @param algo algorithm to implement
48 * @param key_size key size in bytes
49 * @return af_alg_crypter_t, NULL if not supported
50 */
51 af_alg_crypter_t *af_alg_crypter_create(encryption_algorithm_t algo,
52 size_t key_size);
53
54 /**
55 * Probe algorithms and return plugin features.
56 *
57 * @param features plugin features to create
58 * @param pos current position in features
59 */
60 void af_alg_crypter_probe(plugin_feature_t *features, int *pos);
61
62 #endif /** AF_ALG_CRYPTER_H_ @}*/