Last active
April 14, 2020 18:11
-
-
Save MatthewLymer/0adea2df3e900ca002b5a2bfe5b3a1ac to your computer and use it in GitHub Desktop.
Symmetric AES256 encryption and decryption with GPG
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
echo "Attack at dawn!" > secret-message-original.txt | |
echo "MyPassword" | gpg \ | |
--output secret-message.txt.gpg \ | |
--passphrase-fd 0 \ | |
--batch \ | |
--cipher-algo AES256 \ | |
--symmetric secret-message-original.txt | |
echo "MyPassword" | gpg \ | |
--output secret-message-decrypted.txt \ | |
--passphrase-fd 0 \ | |
--batch \ | |
--decrypt secret-message.txt.gpg | |
cat secret-message-original.txt | md5sum | |
cat secret-message-decrypted.txt | md5sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment