ref: 22e01c4fafb7adc6a88370d5ec918a15038cd761
dir: /libcryptohash/test/sha256-test.myr/
use std
use cryptohash
const main = {
print(cryptohash.sha256(""))
print(cryptohash.sha256("h"))
/* 64 byte block */
print(cryptohash.sha256("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
/* tail spanning */
print(cryptohash.sha256("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbb"))
}
const print = {b
for x in b
if (x <= 0xf)
std.put("0%xb", x)
else
std.put("%xb", x)
;;
;;
std.put("\n")
}