065d372f1183328cb72f981be3dea93b17114d69
[strongswan.git] / src / libstrongswan / plugins / openssl / openssl_hasher.h
1 /*
2 * Copyright (C) 2008 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * $Id$
16 */
17
18 /**
19 * @defgroup openssl_hasher openssl_hasher
20 * @{ @ingroup openssl_p
21 */
22
23 #ifndef OPENSSL_HASHER_H_
24 #define OPENSSL_HASHER_H_
25
26 typedef struct openssl_hasher_t openssl_hasher_t;
27
28 #include <crypto/hashers/hasher.h>
29
30 /**
31 * Implementation of hashers using OpenSSL.
32 */
33 struct openssl_hasher_t {
34
35 /**
36 * The hasher_t interface.
37 */
38 hasher_t hasher_interface;
39 };
40
41 /**
42 * Constructor to create openssl_hasher_t.
43 *
44 * @param algo algorithm
45 * @param key_size key size in bytes
46 * @return openssl_hasher_t, NULL if not supported
47 */
48 openssl_hasher_t *openssl_hasher_create(hash_algorithm_t algo);
49
50 #endif /* OPENSSL_HASHER_H_ @}*/