mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
9ec363a25d
A lot of internally used crypto headers are publicly includeable in user projects. This leads to bug reports when these headers are incorrectly used or the API's are not used as intended. Move all crypto headers into private crypto src folder, also move crypto_ops into Supplicant to remove dependecy on crypto headers. Closes IDF-476
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/*
|
|
* MD5 hash implementation and interface functions
|
|
* Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* Alternatively, this software may be distributed under the terms of BSD
|
|
* license.
|
|
*
|
|
* See README and COPYING for more details.
|
|
*/
|
|
|
|
#ifndef MD5_H
|
|
#define MD5_H
|
|
|
|
#define MD5_MAC_LEN 16
|
|
|
|
int hmac_md5_vector(const uint8_t *key, size_t key_len, size_t num_elem,
|
|
const uint8_t *addr[], const size_t *len, uint8_t *mac);
|
|
int hmac_md5(const uint8_t *key, size_t key_len, const uint8_t *data, size_t data_len,
|
|
uint8_t *mac);
|
|
#ifdef CONFIG_FIPS
|
|
int hmac_md5_vector_non_fips_allow(const uint8_t *key, size_t key_len,
|
|
size_t num_elem, const uint8_t *addr[],
|
|
const size_t *len, uint8_t *mac);
|
|
int hmac_md5_non_fips_allow(const uint8_t *key, size_t key_len, const uint8_t *data,
|
|
size_t data_len, uint8_t *mac);
|
|
#else /* CONFIG_FIPS */
|
|
#define hmac_md5_vector_non_fips_allow hmac_md5_vector
|
|
#define hmac_md5_non_fips_allow hmac_md5
|
|
#endif /* CONFIG_FIPS */
|
|
|
|
#endif /* MD5_H */
|