SHA-256: Difference between revisions

m (→‎{{header|Perl 6}}: minor simplification)
Line 832:
The solution to this task would be a small modification to [[MD5#Java|MD5]] (replacing "MD5" with "SHA-256" as noted [http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#MessageDigest here]).
 
=={{header|Julia}}==
<lang Julia>
clear = "Rosetta code"
standard = "764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf"
 
using SHA
 
crypt = sha256(clear)
 
println("Testing Julia's SHA-256:")
if crypt == standard
println(" OK, \"", clear, "\" => ", crypt)
else
println("The hash does not match the standard value.")
end
</lang>
 
{{out}}
<pre>
Testing Julia's SHA-256:
OK, "Rosetta code" => 764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf
</pre>
 
=={{header|Lasso}}==