ns_hotp - Returns a decimal-coded one-time password (HOTP)
The function returns a one-time password based on the HMAC algorithm (HOTP) as described in RFC-4226, allowing the choice of message digest algorithm and the number of digits for the truncated output.
RFC-4226 defines HOTP as:
HOTP(K,C) = Truncate(HMAC-SHA-1(K,C)) K: key C: counter (moving factor for one time passwd)
The implemented function ns_hotp is an extension of the standard RFC by allowing you to specify the message digest algorithm and the number of characters in the truncated output.
The command is available when NaviServer is compiled with OpenSSL support and the nsf package is installed.
data specifies the moving factor for the one-time password (referred to as "C" in the formula above).
nscp 2> ns_hotp -key "tweedie123" 1 763540