Skip to content

Instantly share code, notes, and snippets.

@ziadoz
Created January 11, 2024 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ziadoz/9d8ddb34e6d5fb9a418320291635e67a to your computer and use it in GitHub Desktop.
Bash/ZSH Encrypt/Decrypt File Aliases
#!/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