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