From 92b7c32e19c6fd2fcc080d8c6b8fe67415f35ba5 Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Wed, 29 Jul 2020 18:35:25 +0200 Subject: [PATCH] totp[-docs]: change default totp-hash value to SHA-1 SHA-1 is the hash used by the Google Authenticator application, which this vocab wanted to imitate in the first place. --- extra/totp/totp-docs.factor | 2 +- extra/totp/totp.factor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/totp/totp-docs.factor b/extra/totp/totp-docs.factor index 44c01f6440..449ade9231 100644 --- a/extra/totp/totp-docs.factor +++ b/extra/totp/totp-docs.factor @@ -22,7 +22,7 @@ $nl HELP: totp-hash { $var-description "A cryptographically secure " { $link checksum } " to be used by " { $link totp } " for the HMAC. See " { $url "https://en.wikipedia.org/wiki/HMAC" } " for more information." $nl -"Default value is " { $link sha-256 } "." } ; +"Default value is " { $link sha1 } ", same as used by Google Authenticator." } ; HELP: totp-digits { $var-description "The number of digits returned by " { $link totp } "." diff --git a/extra/totp/totp.factor b/extra/totp/totp.factor index 6e00a2dadc..5d78b37b42 100644 --- a/extra/totp/totp.factor +++ b/extra/totp/totp.factor @@ -5,7 +5,7 @@ math math.bitwise math.parser namespaces sequences ; IN: totp SYMBOLS: totp-hash totp-digits ; -totp-hash [ sha-256 ] initialize +totp-hash [ sha1 ] initialize totp-digits [ 6 ] initialize