|
NAMEoath_hotp_generate - API functionSYNOPSIS#include <oath.h>int oath_hotp_generate(const char * secret, size_t secret_length, uint64_t moving_factor, unsigned digits, bool add_checksum, size_t truncation_offset, char * output_otp); ARGUMENTS
DESCRIPTIONGenerate a one-time-password using the HOTP algorithm as described in RFC 4226.Use a value of OATH_HOTP_DYNAMIC_TRUNCATION for truncation_offset unless you really need a specific truncation offset. To find out the size of the OTP you may use the OATH_HOTP_LENGTH() macro. The output_otp buffer must be have room for that length plus one for the terminating NUL. Currently only values 6, 7 and 8 for digits are supported, and the add_checksum value is ignored. These restrictions may be lifted in future versions, although some limitations are inherent in the protocol. RETURNSOn success, OATH_OK (zero) is returned, otherwise an error code is returned.REPORTING BUGSReport bugs to <oath-toolkit-help@nongnu.org>. liboath home page: https://www.nongnu.org/oath-toolkit/ General help using GNU software: http://www.gnu.org/gethelp/COPYRIGHTCopyright © 2009-2020 Simon Josefsson.Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
Visit the GSP FreeBSD Man Page Interface. |