(rfc totp) - Time-based One-Time Password library

Library (rfc totp)

Provides Time-based One-Time Password (TOTP) generating procedures. TOTP is defined in RFC 6238: RFC 6238.

Function generate-time-based-one-time-password K digit :key time start-time step mode
Function totp K digit :key time start-time step mode

K must be a bytevector represents shared secret.

digit must be a positive exact integer.

The keyword argument time is given, then it must be a UTC time object of SRFI-19. The procedure computes returning one-time password according to the given time. The default value is (current-time).

NOTE: time keyword should not be specified unless its testing purpose.

The keyword arguments described below are system parameters, means these parameters must be agreed between authenticator.

The keyword argument start-time is given, then it must be a UTC time object of SRFI-19. The procedure computes returning one-time password according to the given time. The defaule value is (make-time time-utc 0 0).

The keyword argument step is given, then it must be a positive exact integer. The procedure computes returning one-time password according to the given time. The defaule value is 30.

The keyword argument step is given, then it must be a positive exact integer. The procedure computes returning one-time password according to the given time. The defaule value is 30.

The keyword argument mode is given, then it must be a hash algorithm name either builtin or custom. The procedure computes returning one-time password according to the given time. The defaule value is SHA-1.

Generates an Time-based one-time password.

totp is an alias of generate-time-based-one-time-password.