Jump to content

SHA-1: Difference between revisions

342 bytes added ,  5 years ago
Add Jsish
(Add Jsish)
Line 692:
=={{header|Java}}==
The solution to this task would be a small modification to [[MD5#Java|MD5]] (replacing "MD5" with "SHA-1" as noted [http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#MessageDigest here]).
 
=={{header|Jsish}}==
<lang javascript>/* SHA-1 hash in Jsish */
var str = 'Rosetta code';
puts(Util.hash(str, {type:'sha1'}));
 
/*
=!EXPECTSTART!=
b18c883f4da750164b5af362ea9b9f27f90904b4
=!EXPECTEND!=
*/</lang>
 
{{out}}
<pre>prompt$ jsish sha-1.jsi
b18c883f4da750164b5af362ea9b9f27f90904b4
prompt$ jsish -u sha-1.jsi
[PASS] sha-1.jsi</pre>
 
=={{header|Julia}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.