From 5f682c18dee09ca96767ee541f097e22926b48e2 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 16 Mar 2016 10:12:48 -0700 Subject: [PATCH] use the new bytes>hex-string. --- basis/bootstrap/image/download/download.factor | 4 ++-- basis/bootstrap/image/upload/upload.factor | 2 +- basis/furnace/auth/login/login.factor | 2 +- .../reverse-complement/reverse-complement-tests.factor | 6 +++--- extra/marvel/marvel.factor | 2 +- extra/mongodb/connection/connection.factor | 2 +- extra/oauth/oauth.factor | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/basis/bootstrap/image/download/download.factor b/basis/bootstrap/image/download/download.factor index 1a4357b677..f58a53250b 100644 --- a/basis/bootstrap/image/download/download.factor +++ b/basis/bootstrap/image/download/download.factor @@ -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 ; diff --git a/basis/bootstrap/image/upload/upload.factor b/basis/bootstrap/image/upload/upload.factor index 61fc31024b..5f8e6766f8 100644 --- a/basis/bootstrap/image/upload/upload.factor +++ b/basis/bootstrap/image/upload/upload.factor @@ -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 ; diff --git a/basis/furnace/auth/login/login.factor b/basis/furnace/auth/login/login.factor index d6160352e2..48efebfc71 100644 --- a/basis/furnace/auth/login/login.factor +++ b/basis/furnace/auth/login/login.factor @@ -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 ; diff --git a/extra/benchmark/reverse-complement/reverse-complement-tests.factor b/extra/benchmark/reverse-complement/reverse-complement-tests.factor index cc31f6e0a7..d0f1918bda 100644 --- a/extra/benchmark/reverse-complement/reverse-complement-tests.factor +++ b/extra/benchmark/reverse-complement/reverse-complement-tests.factor @@ -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 diff --git a/extra/marvel/marvel.factor b/extra/marvel/marvel.factor index 810ee79190..883ec31009 100644 --- a/extra/marvel/marvel.factor +++ b/extra/marvel/marvel.factor @@ -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 diff --git a/extra/mongodb/connection/connection.factor b/extra/mongodb/connection/connection.factor index 30096bdaeb..df468bd0fa 100644 --- a/extra/mongodb/connection/connection.factor +++ b/extra/mongodb/connection/connection.factor @@ -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 ; diff --git a/extra/oauth/oauth.factor b/extra/oauth/oauth.factor index 07fd29e752..f0a3c285f8 100644 --- a/extra/oauth/oauth.factor +++ b/extra/oauth/oauth.factor @@ -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 ) [ -- 2.34.1