Jump to content

SHA-256: Difference between revisions

258 bytes added ,  10 years ago
+ standard D version
(Fixed to use digest instead of HMAC.)
(+ standard D version)
Line 289:
 
=={{header|D}}==
===Standard Version===
<lang d>void main() {
import std.stdio, std.digest.sha;
 
writefln("%-(%02x%)", "Rosetta code".sha256Of);
}</lang>
{{out}}
<pre>764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf</pre>
 
===Simple Implementation===
<lang d>// Copyright (C) 2005, 2006 Free Software Foundation, Inc. GNU License.
// Translated to D language. Only lightly tested, not for serious use.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.