1oath_hotp_validate(3) liboath oath_hotp_validate(3)
2
3
4
6 oath_hotp_validate - API function
7
9 #include <oath.h>
10
11 int oath_hotp_validate(const char * secret, size_t secret_length,
12 uint64_t start_moving_factor, size_t window, const char * otp);
13
15 const char * secret
16 the shared secret string
17
18 size_t secret_length
19 length of secret
20
21 uint64_t start_moving_factor
22 start counter in OTP stream
23
24 size_t window
25 how many OTPs after start counter to test
26
27 const char * otp
28 the OTP to validate.
29
31 Validate an OTP according to OATH HOTP algorithm per RFC 4226.
32
33 Currently only OTP lengths of 6, 7 or 8 digits are supported. This
34 restrictions may be lifted in future versions, although some limita‐
35 tions are inherent in the protocol.
36
38 Returns position in OTP window (zero is first position), or
39 OATH_INVALID_OTP if no OTP was found in OTP window, or an error code.
40
42 Report bugs to <oath-toolkit-help@nongnu.org>. liboath home page:
43 http://www.gnu.org/software/liboath/ General help using GNU software:
44 http://www.gnu.org/gethelp/
45
47 Copyright © 2009-2020 Simon Josefsson.
48 Copying and distribution of this file, with or without modification,
49 are permitted in any medium without royalty provided the copyright
50 notice and this notice are preserved.
51
52
53
54liboath 2.6.6 oath_hotp_validate(3)