Evan’s posterous

Adventures in pomodoro and other such things 
« Back to blog

encrypting files using openssl

encrypt file.txt to file.enc using 256-bit AES in CBC mode

openssl enc -aes-256-cbc -salt -in file.txt -out file.enc

the same, only the output is base64 encoded for, e.g., e-mail

openssl enc -aes-256-cbc -a -salt -in file.txt -out file.enc

decrypt binary file.enc

openssl enc -d -aes-256-cbc -in file.enc

decrypt base64-encoded version

openssl enc -d -aes-256-cbc -a -in file.enc


thanks Mark, http://bolusmjak.posterous.com/

Comments (0)

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     twitter