June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -1,13 +1,10 @@
clear = "Rosetta code"
standard = "764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf"
msg = "Rosetta code"
using Nettle
digest = hexdigest("sha256", msg)
# native
using SHA
digest1 = join(num2hex.(sha256(msg)))
crypt = join(map(hex, sha256("Rosetta code")))
println("Testing Julia's SHA-256:")
if crypt == standard
println(" OK, \"", clear, "\" => ", crypt)
else
println("The hash does not match the standard value.")
end
@assert digest == digest1