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

27 lines
465 B

#include "sha1/sha1.h"
#include "hmac-sha1/hmac-sha1.h"
#include "trunc.h"
#include "buffer.h"
#include "usbdrv.h"
#include "usb_key_codes.h"
#include <util/delay.h>
#include <avr/io.h>
#define PORT_BTN PORTB
#define PIN_BTN PINB
#define DDR_BTN DDRB
#define PBTN PB3
#define CNTPOS_PTR ((void*)1)
#define ERROR 32202
#ifndef UINT32_MAX
#define UINT32_MAX 4294967296
#endif
#define DEV_STATE_RESET 0
#define DEV_STATE_SENT 1
#define DEV_STATE_CONFIRMED 2