I'm using the GnuPGInterface module in Python to perform symmetric
encryption:
def symmetric(passphrase, payload):
gnupg.options.armor = 1
gnupg.options.meta_interactive = 0
proc = gnupg.run(['--symmetric'], create_fhs=['stdin', 'stdout',
'passphrase'])
proc.handles['passphrase'].write(passphrase)
proc.handles['passphrase'].close()
proc.handles['stdin'].write(payload)
proc.handles['stdin'].close()
ciphertext = proc.handles['stdout'].read()
proc.handles['stdout'].close()
proc.wait()
return ciphertext
Currently this works fine but defaults to using CAST5 as the cipher.
Does anyone know of a way to pass cipher-algo to it so as to change this
to AES256, Blowfish, etc?