! 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/"
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 ;
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 ;
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 ;
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
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
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 ;
! 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
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 )
[