ruby-gpgme
ruby-gpgme copied to clipboard
Expose IO like object for streaming decryption
Hey, so I've been trying to perform a decryption while avoiding either writing to disk or loading the whole plain text into memory.
I could use Open3 a la:
_, stdout, stderr, thread = Open3.popen3('gpg --decrypt cipher.gpg')
And then use stdout#read downstream, but I'd rather avoid shelling out; ruby-gpgme has served me so well this far!
Is something like this currently possible?
If I remember correctly, it should be already possible. All crypto functions in ruby-gpgme internally use Callback based data buffers, which can be accessed through Data object.