mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-15 16:34:05 +00:00
supplicant/esp_wifi: move supplicant to idf
Move supplicant to idf and do following refactoring: 1. Make the folder structure consitent with supplicant upstream 2. Remove duplicated header files and minimize the public header files 3. Refactor for WiFi/supplicant interfaces
This commit is contained in:
27
components/wpa_supplicant/src/eap_peer/chap.c
Normal file
27
components/wpa_supplicant/src/eap_peer/chap.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* CHAP-MD5
|
||||
*
|
||||
*/
|
||||
#ifdef CHAP_MD5
|
||||
|
||||
#include "utils/includes.h"
|
||||
#include "utils/common.h"
|
||||
#include "crypto/crypto.h"
|
||||
#include "wpa2/eap_peer/chap.h"
|
||||
|
||||
int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
|
||||
size_t challenge_len, u8 *response)
|
||||
{
|
||||
const u8 *addr[3];
|
||||
size_t len[3];
|
||||
|
||||
addr[0] = &id;
|
||||
len[0] = 1;
|
||||
addr[1] = secret;
|
||||
len[1] = secret_len;
|
||||
addr[2] = challenge;
|
||||
len[2] = challenge_len;
|
||||
return md5_vector(3, addr, len, response);
|
||||
}
|
||||
|
||||
#endif /* CHAP_MD5 */
|
Reference in New Issue
Block a user