Creating MD5 Hashes with openssl or jboss
I am working through the JBoss getting started tutorial, and ran across these two neat methods for creating encrypted passwords to store in a database.
From a Bash shell on Linux (or Cygwin–on windoze):
$ echo -n “j2ee” | openssl dgst -md5 -binary | openssl base64
Or using a class in jboss’s library:
$ java -classpath ./jbosssx.jar org.jboss.security.Base64Encoder j2ee MD5