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
glcikLhvxq1BwPBZN0EGMQ==

Or using a class in jboss’s library:

$ java -classpath ./jbosssx.jar org.jboss.security.Base64Encoder j2ee MD5
[glcikLhvxq1BwPBZN0EGMQ==]

Interesting stuff.

__s_i_m_p_l_y__t_i_m_o_t_h_y__

Advertisements

Posted on November 10, 2005, in programattical. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: