2007-05-11

 

Encryption One Liner

We had an interesting mail this morning on the GLUG that demonstrated a one liner for encrypting and decrypting text using OpenSSL.

Here is the demo:
$ echo foo | /usr/bin/openssl enc -e -md md5 -aes-128-cbc -a -k "bar"
U2FsdGVkX18iDqnxzgjr3gk39hShVjLgiBQZ2mFKQOk=
$ echo "U2FsdGVkX18iDqnxzgjr3gk39hShVjLgiBQZ2mFKQOk=" | /usr/bin/openssl enc -d -md md5 -aes-128-cbc -a -k "bar"
foo

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?