Last active
September 4, 2017 05:25
-
-
Save serveba/ee001b14861c66832842 to your computer and use it in GitHub Desktop.
base64 encode/decode, encrypt/decrypt, md5, sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Just base64 encode a binary file: | |
openssl base64 -in file.bin -out file.b64 | |
#Decode the same file | |
openssl base64 -d -in file.b64 -out file.bin | |
#Encrypt a file using triple DES in CBC mode using a prompted password: | |
openssl des3 -salt -in file.txt -out file.des3 | |
#Decrypt a file using a supplied password: | |
openssl des3 -d -salt -in file.des3 -out file.txt -k mypassword | |
#Encrypt a file then base64 encode it (so it can be sent via mail for example) using Blowfish in CBC mode: | |
openssl bf -a -salt -in file.txt -out file.bf | |
#Base64 decode a file then decrypt it: | |
openssl bf -d -salt -a -in file.bf -out file.txt | |
#Decrypt some data using a supplied 40 bit RC4 key: | |
openssl rc4-40 -in file.rc4 -out file.txt -K 0102030405 | |
#MD5 | |
openssl md5 file | |
#SHA1 | |
openssl sha1 file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment