VUSB-Firmware for Attiny85 implementing HMAC one time password authentication
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
hmac-otp/libcrypt/trunc.h

10 lines
238 B

#ifndef _TRUNC_H_
#define _TRUNC_H_
#include "hmac-sha1/hmac-sha1.h"
#define SHA1_SIZE 20
int32_t get_otp(uint8_t* hmac, uint8_t digits);
int32_t get_otp_from_cnt(uint64_t cnt, uint8_t digits, uint8_t* secret, uint8_t sec_len);
#endif