- AUTH_HMAC_MD5_96 and AUTH_HMAC_SHA1_96 implemented and tested...
[strongswan.git] / Source / charon / transforms / signers / hmac_signer.h
1 /**
2 * @file hmac_signer.h
3 *
4 * @brief Interface of hmac_signer_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 */
22
23 #ifndef _HMAC_SIGNER_H_
24 #define _HMAC_SIGNER_H_
25
26 #include <transforms/signers/signer.h>
27 #include <transforms/hashers/hasher.h>
28
29 typedef struct hmac_signer_t hmac_signer_t;
30
31 /**
32 * @brief Implementation of hmac_signer_t interface using the
33 * HMAC algorithm in combination with eather MD5 or SHA1.
34 *
35 * @ingroup signers
36 */
37 struct hmac_signer_t {
38
39 /**
40 * generic signer_t interface for this signer
41 */
42 signer_t signer_interface;
43 };
44
45 /**
46 * @brief Creates a new hmac_signer_t.
47 *
48 * @param hash_algorithm Hash algorithm to use with signer
49 *
50 * @return
51 * - hmac_signer_t if successfully
52 * - NULL if out of ressources
53 *
54 * @ingroup signers
55 */
56 hmac_signer_t *hmac_signer_create(hash_algorithm_t hash_algoritm);
57
58
59 #endif //_HMAC_SIGNER_H_