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/hmac.h

19 lines
306 B

#ifndef _HMAC_H_
#define _HMAC_H_
#define IPAD 0x36
#define OPAD 0x5C
#define SHA1_B 64
#define SHA1_SIZE 20
#include <stdlib.h>
#include <string.h>
#include "sha1.h"
uint8_t hmac_result[SHA1_SIZE];
void hmac(uint8_t* msg, uint8_t msglen, uint8_t* secret, uint8_t sec_len);
#endif //_HMAC_H_