1/*
2 * prf.h
3 * PRF function used in WPA and TGi
4 *
5 * Copyright 2003, Broadcom Corporation
6 * All Rights Reserved.
7 *
8 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation; the
9 * contents of this file may not be disclosed to third parties, copied or
10 * duplicated in any form, in whole or in part, without the prior written
11 * permission of Broadcom Corporation.
12 *
13 * $Id: prf.h,v 1.1.1.1 2008/10/15 03:31:22 james26_jang Exp $
14 */
15
16#ifndef _PRF_H_
17#define _PRF_H_
18
19#include <typedefs.h>
20
21/* lengths in Bytes */
22#define PRF_MAX_I_D_LEN	1024
23#define PRF_MAX_KEY_LEN	64
24#define PRF_OUTBUF_LEN	80
25
26int PRF(unsigned char *key, int key_len, unsigned char *prefix,
27	int prefix_len, unsigned char *data, int data_len,
28	unsigned char *output, int len);
29
30int fPRF(unsigned char *key, int key_len, unsigned char *prefix,
31	int prefix_len, unsigned char *data, int data_len,
32	unsigned char *output, int len);
33
34void hmac_sha1(unsigned char *text, int text_len, unsigned char *key,
35	       int key_len, unsigned char *digest);
36
37void hmac_md5(unsigned char *text, int text_len, unsigned char *key,
38	      int key_len, unsigned char *digest);
39
40#endif /* _PRF_H_ */
41
42