$search
00001 /* 00002 * SHA1 hash implementation and interface functions 00003 * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation. 00008 * 00009 * Alternatively, this software may be distributed under the terms of BSD 00010 * license. 00011 * 00012 * See README and COPYING for more details. 00013 */ 00014 00015 #ifndef SHA1_H 00016 #define SHA1_H 00017 00018 #define SHA1_MAC_LEN 20 00019 00020 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, 00021 const u8 *addr[], const size_t *len, u8 *mac); 00022 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 00023 u8 *mac); 00024 int sha1_prf(const u8 *key, size_t key_len, const char *label, 00025 const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 00026 int sha1_t_prf(const u8 *key, size_t key_len, const char *label, 00027 const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len); 00028 int __must_check tls_prf(const u8 *secret, size_t secret_len, 00029 const char *label, const u8 *seed, size_t seed_len, 00030 u8 *out, size_t outlen); 00031 int pbkdf2_sha1(const char *passphrase, const char *ssid, size_t ssid_len, 00032 int iterations, u8 *buf, size_t buflen); 00033 #endif /* SHA1_H */