1 USING: accessors byte-arrays checksums checksums.openssl
2 combinators.short-circuit kernel system tools.test ;
5 B{ 201 238 222 100 92 200 182 188 138 255 129 163 115 88 240 136 }
8 "Hello world from the openssl binding" >byte-array
9 "md5" <openssl-checksum> checksum-bytes
13 B{ 63 113 237 255 181 5 152 241 136 181 43 95 160 105 44 87 49 82 115 0 }
16 "Hello world from the openssl binding" >byte-array
17 "sha1" <openssl-checksum> checksum-bytes
21 "Bad checksum test" >byte-array
22 "no such checksum" <openssl-checksum>
24 ] [ { [ unknown-digest? ] [ name>> "no such checksum" = ] } 1&& ]
27 { } [ image-path openssl-sha1 checksum-file drop ] unit-test