1oath_hotp_validate(3)               liboath              oath_hotp_validate(3)
2
3
4

NAME

6       oath_hotp_validate - API function
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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 re‐
34       strictions  may be lifted in future versions, although some limitations
35       are inherent in the protocol.
36

RETURNS

38       Returns position in OTP window (zero is first  position),  or  OATH_IN‐
39       VALID_OTP if no OTP was found in OTP window, or an error code.
40

REPORTING BUGS

42       Report  bugs  to  <oath-toolkit-help@nongnu.org>.   liboath  home page:
43       https://www.nongnu.org/oath-toolkit/ 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  no‐
50       tice and this notice are preserved.
51
52
53
54liboath                              2.6.7               oath_hotp_validate(3)
Impressum