Encrypt and Decrypt files using GPG Algorithm - https://www.gnupg.org/
gpg --delete-secret-keys "Vignesh T.V."
gpg --delete-keys "Vignesh T.V."
gpg --gen-key
gpg --output ./mygpg.key --armor --export vigneshviswam@gmail.com
gpg --list-secret-keys (Get the ID from there and replace the ID below)
gpg --export-secret-keys 0009E10FB8CF0BD4699A72257250F6DB43FE74C2 > gpg-private.asc
gpg --trust-model always --encrypt --armor -o ./encrypted.asc -r vigneshviswam@gmail.com ./file.txt
Decryption
gpg --import gpg-private.asc
gpgconf –list-dirs
allow-loopback-pinentry
gpgconf --kill gpg-agent gpg-connect-agent reloadagent /bye
echo |gpg --pinentry-mode loopback --batch --passphrase-fd 0 -d %1