aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffi/ffi.h')
-rw-r--r--src/lib/ffi/ffi.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h
index 54c01174c..8a4570c52 100644
--- a/src/lib/ffi/ffi.h
+++ b/src/lib/ffi/ffi.h
@@ -1440,6 +1440,42 @@ int botan_key_unwrap3394(const uint8_t wrapped_key[], size_t wrapped_key_len,
uint8_t key[], size_t *key_len);
/**
+* HOTP
+*/
+
+typedef struct botan_hotp_struct* botan_hotp_t;
+
+/**
+* Initialize an HOTP instance
+*/
+int botan_hotp_init(botan_hotp_t* hotp,
+ const uint8_t key[], size_t key_len,
+ const char* hash_algo,
+ size_t digits);
+
+/**
+* Destroy a HOTP instance
+*/
+int botan_hotp_destroy(botan_hotp_t hotp);
+
+/**
+* Generate an HOTP code for the provided counter
+*/
+int botan_hotp_generate(botan_hotp_t hotp,
+ uint32_t* hotp_code,
+ uint64_t hotp_counter);
+
+/**
+* Verify an HOTP code
+*/
+int botan_hotp_check(botan_hotp_t hotp,
+ uint64_t* next_hotp_counter,
+ uint32_t hotp_code,
+ uint64_t hotp_counter,
+ size_t resync_range);
+
+
+/**
* Format Preserving Encryption
*/