1e5b75505Sopenharmony_ci/*
2e5b75505Sopenharmony_ci * SHA1 hash implementation and interface functions
3e5b75505Sopenharmony_ci * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi>
4e5b75505Sopenharmony_ci *
5e5b75505Sopenharmony_ci * This software may be distributed under the terms of the BSD license.
6e5b75505Sopenharmony_ci * See README for more details.
7e5b75505Sopenharmony_ci */
8e5b75505Sopenharmony_ci
9e5b75505Sopenharmony_ci#ifndef SHA1_H
10e5b75505Sopenharmony_ci#define SHA1_H
11e5b75505Sopenharmony_ci
12e5b75505Sopenharmony_ci#define SHA1_MAC_LEN 20
13e5b75505Sopenharmony_ci
14e5b75505Sopenharmony_ciint hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem,
15e5b75505Sopenharmony_ci		     const u8 *addr[], const size_t *len, u8 *mac);
16e5b75505Sopenharmony_ciint hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
17e5b75505Sopenharmony_ci	       u8 *mac);
18e5b75505Sopenharmony_ciint sha1_prf(const u8 *key, size_t key_len, const char *label,
19e5b75505Sopenharmony_ci	     const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
20e5b75505Sopenharmony_ciint sha1_t_prf(const u8 *key, size_t key_len, const char *label,
21e5b75505Sopenharmony_ci	       const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len);
22e5b75505Sopenharmony_ciint __must_check tls_prf_sha1_md5(const u8 *secret, size_t secret_len,
23e5b75505Sopenharmony_ci				  const char *label, const u8 *seed,
24e5b75505Sopenharmony_ci				  size_t seed_len, u8 *out, size_t outlen);
25e5b75505Sopenharmony_ciint pbkdf2_sha1(const char *passphrase, const u8 *ssid, size_t ssid_len,
26e5b75505Sopenharmony_ci		int iterations, u8 *buf, size_t buflen);
27e5b75505Sopenharmony_ci#endif /* SHA1_H */
28