Handbook
Glossary
totp* ( count key hash -- n )
Time-Based One-Time Passwords
Prev:
timestamp>count* ( timestamp secs/count -- count )
Next:
digits ( n digits -- string )
Vocabulary
totp
Inputs
count
a number of time intervals elapsed since a fixed time point
key
a secret key shared between the client and the server
hash
a
checksum
Outputs
n
a
fixnum
Word description
This is a fully customizable version of
totp
. To convert a
timestamp
into the
count
value, use
timestamp>count
.
n
is a positive 31-bit integer. To convert the returned value into a string of a predetermined length, use
digits
.
See also
totp
Definition
USING:
checksums.hmac
totp.private
;
IN:
totp
:
totp*
( count key hash -- n )
hmac-bytes
totp-value
;