use the new bytes>hex-string.

locals-and-roots
John Benediktsson 2016-03-16 10:12:48 -07:00
parent 59b41e4f90
commit 5f682c18de
7 changed files with 12 additions and 12 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs bootstrap.image checksums checksums.md5
http.client io.files kernel splitting urls ;
http.client io.files kernel math.parser splitting urls ;
IN: bootstrap.image.download
CONSTANT: url URL" http://downloads.factorcode.org/images/latest/"
@ -11,7 +11,7 @@ CONSTANT: url URL" http://downloads.factorcode.org/images/latest/"
string-lines [ " " split1 ] { } map>assoc ;
: file-checksum ( image -- checksum )
md5 checksum-file hex-string ;
md5 checksum-file bytes>hex-string ;
: download-checksum ( image -- checksum )
download-checksums at ;

View File

@ -29,7 +29,7 @@ SYMBOL: build-images-destination
checksums-path ascii [
boot-image-names [
[ write bl ]
[ openssl-md5 checksum-file hex-string print ]
[ openssl-md5 checksum-file bytes>hex-string print ]
bi
] each
] with-file-writer ;

View File

@ -16,7 +16,7 @@ IN: furnace.auth.login
SYMBOL: permit-id
: permit-id-key ( realm -- string )
hex-string "__p_" prepend ;
bytes>hex-string "__p_" prepend ;
: client-permit-id ( realm -- id/f )
permit-id-key client-state dup [ string>number ] when ;

View File

@ -1,9 +1,9 @@
IN: benchmark.reverse-complement.tests
USING: benchmark.reverse-complement checksums checksums.md5 io.files
io.files.temp kernel tools.test ;
USING: benchmark.reverse-complement checksums checksums.md5
io.files io.files.temp kernel math.parser tools.test ;
{ "c071aa7e007a9770b2fb4304f55a17e5" } [
"resource:extra/benchmark/reverse-complement/reverse-complement-test-in.txt"
"reverse-complement-test-out.txt" temp-file
[ reverse-complement ] keep md5 checksum-file hex-string
[ reverse-complement ] keep md5 checksum-file bytes>hex-string
] unit-test

View File

@ -15,7 +15,7 @@ marvel-base-url [ "http://gateway.marvel.com/v1/public/" ] initialize
number>string
marvel-private-key get
marvel-public-key get
3append md5 checksum-bytes hex-string ;
3append md5 checksum-bytes bytes>hex-string ;
:: make-marvel-params-url ( endpoint params -- url )
nano-count

View File

@ -7,7 +7,7 @@ namespaces sequences splitting ;
IN: mongodb.connection
: md5-checksum ( string -- digest )
utf8 encode md5 checksum-bytes hex-string ; inline
utf8 encode md5 checksum-bytes bytes>hex-string ; inline
TUPLE: mdb-db name username pwd-digest nodes collections ;

View File

@ -2,8 +2,8 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs base64 calendar checksums.hmac
checksums.sha combinators fry http http.client kernel locals
make math namespaces present random sequences sorting strings
urls urls.encoding urls.private checksums ;
make math math.parser namespaces present random sequences
sorting strings urls urls.encoding urls.private ;
IN: oauth
SYMBOL: consumer-token
@ -26,7 +26,7 @@ nonce ;
new
consumer-token get >>consumer-token
now timestamp>unix-time >integer >>timestamp
16 random-bytes hex-string >>nonce ; inline
16 random-bytes bytes>hex-string >>nonce ; inline
: present-base-url ( url -- string )
[