# File Encryption with OpenSSL
- May 31, 2010 | 0 min read
Time to time you may find the need to encrypt a file before sending it to someone or store it where other people may have access to it. OpenSSL is a great tool for this and it is installed on most Linux/Unix and OS X (also, I believe there is an install for OpenSSL for Windows too).
Here's the command to encrypt a file,
1 | |
It will ask you for a password and then encrypt the file.
To decrypt,
1 | |
You can also pipe in data in and out of OpenSSL by removing the -in or -out (or both) like so,
1 | |
1 | |
You are also able to use different encryption algorithms with OpenSSL as long as you encrypt and decrypt using the same algorithms.
Open for questions, comments, or any way to improve this!