本项止转自github官方arduino-esp32 传在这里仅为阅读源码方便
projectuser
2019-07-05 50148ccffe21ff54262064ec9f2245900eaf18aa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * MSCHAPV2
 */
 
 
#ifndef MSCHAPV2_H
#define MSCHAPV2_H
 
#define MSCHAPV2_CHAL_LEN        16
#define MSCHAPV2_NT_RESPONSE_LEN    24
#define MSCHAPV2_AUTH_RESPONSE_LEN    20
#define MSCHAPV2_MASTER_KEY_LEN        16
 
const u8 * mschapv2_remove_domain(const u8 *username, size_t *len);
int mschapv2_derive_response(const u8 *username, size_t username_len,
                 const u8 *password, size_t password_len,
                 int pwhash,
                 const u8 *auth_challenge,
                 const u8 *peer_challenge,
                 u8 *nt_response, u8 *auth_response,
                 u8 *master_key);
int mschapv2_verify_auth_response(const u8 *auth_response,
                  const u8 *buf, size_t buf_len);
#endif /* MSCHAPV2_H */