The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
chap.h File Reference

Structures and functions for parsing raw network packets. More...

#include <freeradius-devel/util/md5.h>
+ Include dependency graph for chap.h:

Go to the source code of this file.

Macros

#define FR_CHAP_CHALLENGE_LENGTH   (MD5_DIGEST_LENGTH)
 

Functions

void fr_chap_encode (uint8_t out[static 1+FR_CHAP_CHALLENGE_LENGTH], uint8_t id, uint8_t const *challenge, size_t challenge_len, char const *password, size_t password_len)
 Encode a CHAP password. More...
 

Detailed Description

Structures and functions for parsing raw network packets.

Author
Alan DeKok (aland.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)

Definition in file chap.h.

Macro Definition Documentation

◆ FR_CHAP_CHALLENGE_LENGTH

#define FR_CHAP_CHALLENGE_LENGTH   (MD5_DIGEST_LENGTH)

Definition at line 33 of file chap.h.

Function Documentation

◆ fr_chap_encode()

void fr_chap_encode ( uint8_t  out[static 1+FR_CHAP_CHALLENGE_LENGTH],
uint8_t  id,
uint8_t const *  challenge,
size_t  challenge_len,
char const *  password,
size_t  password_len 
)

Encode a CHAP password.

Parameters
[out]outAn output buffer of 17 bytes (id + MD5 digest).
[in]idCHAP ID, a random ID for request/response matching.
[in]challengethe CHAP challenge
[in]challenge_lenLength of the challenge.
[in]passwordInput password to hash.
[in]password_lenLength of input password.

Definition at line 34 of file chap.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: