Last active
January 8, 2022 22:17
-
-
Save epomatti/c58f680b9e22b2465487cd628c6c730a to your computer and use it in GitHub Desktop.
gpg symmetric cipher
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
# How to encrypt a sensitive file with symmetric cipher. (e.g. Solana keypairs) | |
keypair="$HOME/.config/solana/mainnet.json" | |
# This will create a new encrypted file "mainnet.json.gpg" on the target location | |
# You'll be asked to enter a passphrase | |
gpg -c --no-symkey-cache $keypair | |
# Run this command to decrypt the file using your previous passphrase | |
gpg -d --no-symkey-cache "$keypair.gpg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment