Leancrypto
1.6.0
Post-Quantum Cryptographic Library
Loading...
Searching...
No Matches
leancrypto-1.6.0
otp
api
lc_hotp.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2022 - 2025, Stephan Mueller <smueller@chronox.de>
3
*
4
* License: see LICENSE file in root directory
5
*
6
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
7
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
9
* WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
10
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
11
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
12
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
13
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
14
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
15
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
16
* USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
17
* DAMAGE.
18
*/
19
20
#ifndef LC_HOTP_H
21
#define LC_HOTP_H
22
23
#include "ext_headers.h"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
45
void
lc_hotp
(
const
uint8_t *hmac_key,
size_t
hmac_key_len, uint64_t counter,
46
uint32_t digits, uint32_t *hotp_val);
47
48
#ifdef __cplusplus
49
}
50
#endif
51
52
#endif
/* LC_HOTP_H */
lc_hotp
void lc_hotp(const uint8_t *hmac_key, size_t hmac_key_len, uint64_t counter, uint32_t digits, uint32_t *hotp_val)
HMAC-Based One-Time Password Algorithm - RFC 4226.
Generated by
1.15.0