modern: update CHAR:
parent
e1d48ba12f
commit
81d7e86494
|
@ -75,15 +75,15 @@ M: string make-slot-descriptions
|
|||
dup printable? [ 1string ] [
|
||||
dup 0xff <= [
|
||||
H{
|
||||
{ CHAR: \a "\\a" }
|
||||
{ CHAR: \b "\\b" }
|
||||
{ CHAR: \e "\\e" }
|
||||
{ CHAR: \f "\\f" }
|
||||
{ CHAR: \n "\\n" }
|
||||
{ CHAR: \r "\\r" }
|
||||
{ CHAR: \t "\\t" }
|
||||
{ CHAR: \v "\\v" }
|
||||
{ CHAR: \0 "\\0" }
|
||||
{ char: \a "\\a" }
|
||||
{ char: \b "\\b" }
|
||||
{ char: \e "\\e" }
|
||||
{ char: \f "\\f" }
|
||||
{ char: \n "\\n" }
|
||||
{ char: \r "\\r" }
|
||||
{ char: \t "\\t" }
|
||||
{ char: \v "\\v" }
|
||||
{ char: \0 "\\0" }
|
||||
} ?at [ "\\x%02x" sprintf ] unless
|
||||
] [
|
||||
"\\u{%x}" sprintf
|
||||
|
|
|
@ -25,7 +25,7 @@ PRIVATE>
|
|||
hmac-bytes totp-value ;
|
||||
|
||||
: digits ( n digits -- string )
|
||||
[ number>string ] dip [ CHAR: 0 pad-head ] keep tail* ;
|
||||
[ number>string ] dip [ char: 0 pad-head ] keep tail* ;
|
||||
|
||||
: totp ( key -- string )
|
||||
now timestamp>count swap totp-hash get totp* totp-digits get digits ;
|
||||
|
|
Loading…
Reference in New Issue