]> git.ipfire.org Git - thirdparty/strongswan.git/blob - programs/charon/lib/crypto/signers/hmac_signer.h
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / programs / charon / lib / crypto / 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 <crypto/signers/signer.h>
27 #include <crypto/hashers/hasher.h>
28
29 typedef struct hmac_signer_t hmac_signer_t;
30
31 /**
32 * @brief Implementation of signer_t interface using the
33 * HMAC algorithm in combination with either 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_algoritm Hash algorithm to use with signer
49 * @return
50 * - hmac_signer_t
51 * - NULL if hash algorithm not supported
52 *
53 * @ingroup signers
54 */
55 hmac_signer_t *hmac_signer_create(hash_algorithm_t hash_algoritm);
56
57
58 #endif /*HMAC_SIGNER_H_*/