Created
January 11, 2024 17:38
-
-
Save ziadoz/9d8ddb34e6d5fb9a418320291635e67a to your computer and use it in GitHub Desktop.
Bash/ZSH Encrypt/Decrypt File Aliases
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
#!/usr/bin/env bash | |
# @see: https://superuser.com/questions/370388/simple-built-in-way-to-encrypt-and-decrypt-a-file-on-a-mac-via-command-line | |
# @see: https://askubuntu.com/questions/1093591/how-should-i-change-encryption-according-to-warning-deprecated-key-derivat | |
alias decrypt="openssl enc -d -aes-256-cbc -md sha512 -pbkdf2 -iter 1000000 -in $1 -out $2" | |
alias encrypt="openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 1000000 -salt -in $1 -out $2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment