couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Security_Features_Overview" by PaulMietzEgli
Date Sat, 19 Mar 2011 00:27:55 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Security_Features_Overview" page has been changed by PaulMietzEgli.
The comment on this change is: added example code for generating password digest with Java.
http://wiki.apache.org/couchdb/Security_Features_Overview?action=diff&rev1=21&rev2=22

--------------------------------------------------

  {{{
  hex_sha1(foobar);
  }}}
+ 
+ Java (using [[http://www.jasypt.org/|Jasypt]] library)
+ {{{
+ import org.jasypt.digest.StandardStringDigester;
+ 
+ StringDigester digester = new StandardStringDigester();
+ digester.setAlgorithm("SHA-1");
+ digester.setIterations(1);
+ digester.setStringOutputType("hexadecimal");
+ digester.setSaltSizeBytes(0);
+ String digested = digester.digest("foobar").toLowerCase();  // 8843d7f92416211de9ebb963ff4ce28125932878
+ }}}
  ==== Salt and Password Generator ====
  This Perl script expects a password on STDIN or as its first parameter, and an optional
salt as its second parameter. If no salt is provided, a random one will be selected.
  

Mime
View raw message