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. ! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: assocs bootstrap.image checksums checksums.md5 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 IN: bootstrap.image.download
CONSTANT: url URL" http://downloads.factorcode.org/images/latest/" 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 ; string-lines [ " " split1 ] { } map>assoc ;
: file-checksum ( image -- checksum ) : file-checksum ( image -- checksum )
md5 checksum-file hex-string ; md5 checksum-file bytes>hex-string ;
: download-checksum ( image -- checksum ) : download-checksum ( image -- checksum )
download-checksums at ; download-checksums at ;

View File

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

View File

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

View File

@ -1,9 +1,9 @@
IN: benchmark.reverse-complement.tests IN: benchmark.reverse-complement.tests
USING: benchmark.reverse-complement checksums checksums.md5 io.files USING: benchmark.reverse-complement checksums checksums.md5
io.files.temp kernel tools.test ; io.files io.files.temp kernel math.parser tools.test ;
{ "c071aa7e007a9770b2fb4304f55a17e5" } [ { "c071aa7e007a9770b2fb4304f55a17e5" } [
"resource:extra/benchmark/reverse-complement/reverse-complement-test-in.txt" "resource:extra/benchmark/reverse-complement/reverse-complement-test-in.txt"
"reverse-complement-test-out.txt" temp-file "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 ] unit-test

View File

@ -15,7 +15,7 @@ marvel-base-url [ "http://gateway.marvel.com/v1/public/" ] initialize
number>string number>string
marvel-private-key get marvel-private-key get
marvel-public-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 ) :: make-marvel-params-url ( endpoint params -- url )
nano-count nano-count

View File

@ -7,7 +7,7 @@ namespaces sequences splitting ;
IN: mongodb.connection IN: mongodb.connection
: md5-checksum ( string -- digest ) : 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 ; TUPLE: mdb-db name username pwd-digest nodes collections ;

View File

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