By default, gpg2 uses CAST5 for a symmetric encryption. Here
crypto = GPGME::Crypto.new()
r = crypto.encrypt "Hello world!\n", symmetric: true
r.read() will return CAST5 data.
How to change the default cipher algo to, for example, AES256?
By default, gpg2 uses CAST5 for a symmetric encryption. Here
crypto = GPGME::Crypto.new()
r = crypto.encrypt "Hello world!\n", symmetric: true
r.read() will return CAST5 data.
How to change the default cipher algo to, for example, AES256?
Well, apparently it's not possible to change the cipher through the API, but is possible w/ an indirect trick.
Create a tmp directory
/foo/bar& put in itgpg.conffile w/ the line:Set a 'home' directory for gpgme (before
GPGME::Crypto.new):