All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
otp_radstate.c File Reference
#include "extern.h"
#include <string.h>
#include <openssl/des.h>
#include <openssl/md5.h>
#include <openssl/hmac.h>
+ Include dependency graph for otp_radstate.c:

Go to the source code of this file.


#define _FR_MD4_H
#define _FR_SHA1_H


size_t otp_gen_state (char state[OTP_MAX_RADSTATE_LEN], char const challenge[OTP_MAX_CHALLENGE_LEN], size_t clen, int32_t flags, int32_t when, uint8_t const key[16])
 Generate an OTP state value. More...

Macro Definition Documentation

#define _FR_MD4_H

Definition at line 26 of file otp_radstate.c.

#define _FR_SHA1_H

Definition at line 27 of file otp_radstate.c.

Function Documentation

size_t otp_gen_state ( char  state[OTP_MAX_RADSTATE_LEN],
char const  challenge[OTP_MAX_CHALLENGE_LEN],
size_t  clen,
int32_t  flags,
int32_t  when,
uint8_t const  key[16] 

Generate an OTP state value.

Generates an OTP state value (an string of ASCII hexits in an opaque binary string).

[out]statebuffer in which to write the generated state value.
[in]challengeThe challenge value.
[in]clenThe length of the challenge data.
[in]flagsto remember.
[in]whenthe challenge was originally generated.
[in]keyHMAC key.
the amount of data written into the state buffer.

Definition at line 108 of file otp_radstate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: