updated Doxyfile
[strongswan.git] / src / libstrongswan / plugins / hmac / hmac_signer.h
1 /*
2 * Copyright (C) 2005-2008 Martin Willi
3 * Copyright (C) 2005 Jan Hutter
4 * Hochschule fuer Technik Rapperswil
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 hmac_signer hmac_signer
19 * @{ @ingroup hmac_p
20 */
21
22 #ifndef HMAC_SIGNER_H_
23 #define HMAC_SIGNER_H_
24
25 typedef struct hmac_signer_t hmac_signer_t;
26
27 #include <crypto/signers/signer.h>
28
29 /**
30 * Implementation of signer_t interface using HMAC.
31 *
32 * HMAC uses a standard hash function implemented in a hasher_t to build a MAC.
33 */
34 struct hmac_signer_t {
35
36 /**
37 * generic signer_t interface for this signer
38 */
39 signer_t signer_interface;
40 };
41
42 /**
43 * Creates a new hmac_signer_t.
44 *
45 * HMAC signatures are often truncated to shorten them to a more usable, but
46 * still secure enough length.
47 * Block size must be equal or smaller then the hash algorithms
48 * hash.
49 *
50 * @param algo algorithm to implement
51 * @return hmac_signer_t, NULL if not supported
52 */
53 hmac_signer_t *hmac_signer_create(integrity_algorithm_t algo);
54
55 #endif /** HMAC_SIGNER_H_ @}*/