Last active
August 20, 2016 08:51
-
-
Save simonhaenisch/c8af2843b17c16213a06004fa2209b82 to your computer and use it in GitHub Desktop.
OpenSSL file en-/decryption
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
#! /bin/bash | |
file="path/to/file.txt" | |
# encrypt | |
openssl enc -aes-256-cbc -e -in "$file" -out "${file}_encrypted" -pass pass:<password> | |
# decrypt | |
openssl enc -aes-256-cbc -d -in "$file" -out "${file}_decrypted" -pass pass:<password> | |
unset file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment