md5 checksum-file bytes>hex-string ;
: download-checksum ( image -- checksum )
- download-checksums at ;
+ download-checksums at " " split1 drop ;
: need-new-image? ( image -- ? )
dup file-exists?
checksums-path ascii [
boot-image-names [
[ write bl ]
- [ openssl-md5 checksum-file bytes>hex-string print ]
- bi
+ [ openssl-md5 checksum-file bytes>hex-string write bl ]
+ [ openssl-sha256 checksum-file bytes>hex-string print ]
+ tri
] each
] with-file-writer ;
CONSTANT: openssl-sha1 T{ openssl-checksum f "sha1" }
+CONSTANT: openssl-sha256 T{ openssl-checksum f "sha256" }
+
C: <openssl-checksum> openssl-checksum
<PRIVATE