mschapv2.h 834 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * MSCHAPV2 (RFC 2759)
  3. * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef MSCHAPV2_H
  9. #define MSCHAPV2_H
  10. #define MSCHAPV2_CHAL_LEN 16
  11. #define MSCHAPV2_NT_RESPONSE_LEN 24
  12. #define MSCHAPV2_AUTH_RESPONSE_LEN 20
  13. #define MSCHAPV2_MASTER_KEY_LEN 16
  14. const u8 * mschapv2_remove_domain(const u8 *username, size_t *len);
  15. int mschapv2_derive_response(const u8 *username, size_t username_len,
  16. const u8 *password, size_t password_len,
  17. int pwhash,
  18. const u8 *auth_challenge,
  19. const u8 *peer_challenge,
  20. u8 *nt_response, u8 *auth_response,
  21. u8 *master_key);
  22. int mschapv2_verify_auth_response(const u8 *auth_response,
  23. const u8 *buf, size_t buf_len);
  24. #endif /* MSCHAPV2_H */