I have a xlsx encrypted file of a client, which is encrypted using PGP encryption. There is also a public key (txt file) which was shared. The public key is in the below format:
-----BEGIN PGP PUBLIC KEY BLOCK-----
aBC...
-----END PGP PUBLIC KEY BLOCK-----
These are the only information shared. How can i decrypt the xlsx file data in my rails application?
I tried installing gem 'gpgme'
and tried importing the key as mentioned below:
crypto = GPGME::Crypto.new
GPGME::Key.import(File.open('publickey1.txt'))
But its showing "Unsupported protocol"
error.
What is the correct way to import the key and decrypt the data? Is there any further information required for this decryption?
gpgme gem version: 2.0.24
rails version: 7.0.8.1