- prf_hmac_sha1 is now a generig prf_hmac
[strongswan.git] / Source / charon / transforms / prfs / prf_hmac.h
1 /**
2 * @file prf_hmac.h
3 *
4 * @brief Implementation of prf_t interface using the
5 * a HMAC algorithm. This simply wraps a hmac in a prf.
6 *
7 */
8
9 /*
10 * Copyright (C) 2005 Jan Hutter, Martin Willi
11 * Hochschule fuer Technik Rapperswil
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 */
23
24 #ifndef PRF_HMAC_H_
25 #define PRF_HMAC_H_
26
27 #include "prf.h"
28
29 #include "../../types.h"
30 #include "../hashers/hasher.h"
31
32 /**
33 * Object representing a prf using HMAC
34 *
35 */
36 typedef struct prf_hmac_s prf_hmac_t;
37
38 struct prf_hmac_s {
39
40 /**
41 * generic prf_t interface for this prf
42 */
43 prf_t prf_interface;
44 };
45
46 /**
47 * Creates a new prf_hmac_t object
48 *
49 * @param hash_algorithm hmac's hash algorithm
50 * @return
51 * - prf_hmac_t if successfully
52 * - NULL if out of ressources
53 */
54 prf_hmac_t *prf_hmac_create(hash_algorithm_t hash_algorithm);
55
56 #endif /*PRF_HMAC_SHA1_H_*/