]> gitweb.factorcode.org Git - factor.git/commitdiff
totp[-docs]: change default totp-hash value to SHA-1
authorAlexander Iljin <ajsoft@yandex.ru>
Wed, 29 Jul 2020 16:35:25 +0000 (18:35 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 29 Jul 2020 17:44:07 +0000 (17:44 +0000)
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
extra/totp/totp.factor

index 44c01f6440149ea7803be27f87917be1a86aeb5c..449ade92317343f135e9ba17d5e8c4886aecc0f7 100644 (file)
@@ -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 } "."
index 6e00a2dadc680cde5ad8622b9d0f27b4a43120b3..5d78b37b42d3db5338a8c4c8ef6b043f411ea03b 100644 (file)
@@ -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
 
 <PRIVATE