1189251Ssam/* 2189251Ssam * SHA1 hash implementation and interface functions 3214734Srpaulo * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> 4189251Ssam * 5189251Ssam * This program is free software; you can redistribute it and/or modify 6189251Ssam * it under the terms of the GNU General Public License version 2 as 7189251Ssam * published by the Free Software Foundation. 8189251Ssam * 9189251Ssam * Alternatively, this software may be distributed under the terms of BSD 10189251Ssam * license. 11189251Ssam * 12189251Ssam * See README and COPYING for more details. 13189251Ssam */ 14189251Ssam 15189251Ssam#ifndef SHA1_H 16189251Ssam#define SHA1_H 17189251Ssam 18189251Ssam#define SHA1_MAC_LEN 20 19189251Ssam 20214734Srpauloint hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, 21214734Srpaulo const u8 *addr[], const size_t *len, u8 *mac); 22214734Srpauloint hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 23189251Ssam u8 *mac); 24214734Srpauloint sha1_prf(const u8 *key, size_t key_len, const char *label, 25214734Srpaulo const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 26214734Srpauloint sha1_t_prf(const u8 *key, size_t key_len, const char *label, 27214734Srpaulo const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len); 28189251Ssamint __must_check tls_prf(const u8 *secret, size_t secret_len, 29189251Ssam const char *label, const u8 *seed, size_t seed_len, 30189251Ssam u8 *out, size_t outlen); 31214734Srpauloint pbkdf2_sha1(const char *passphrase, const char *ssid, size_t ssid_len, 32214734Srpaulo int iterations, u8 *buf, size_t buflen); 33189251Ssam#endif /* SHA1_H */ 34