SHA-256: Difference between revisions

Forth version
(Forth version)
Line 1,650:
</pre>
 
=={{header|Forth}}==
===GNU Forth 0.7.9 on Linux===
Uses the information from the C version on which libraries to reference.
<lang Forth>
c-library crypto
 
s" ssl" add-lib
s" crypto" add-lib
 
\c #include <openssl/sha.h>
 
c-function sha256 SHA256 a n a -- a
 
end-c-library
 
: h.r ( n1 n2 -- ) base @ -rot hex u.r base ! ;
 
: .digest ( a -- )
32 bounds do i c@ 2 h.r loop space ;
 
s" Rosetta code" 0 sha256 .digest cr
bye
</lang>
{{Out}}
<pre>
764FAF5C61AC315F1497F9DFA542713965B785E5CC2F707D6468D7D1124CDFCF
</pre>
=={{header|Fortran}}==
===Intel Fortran on Windows===
357

edits