I just installed pyme
on my ubuntu system. it was easy (thanks apt-get) and I can reproduce the example code (encrypting using a public key in my keyring). now I would like to sign some data and I didn't manage to find any example code nor much documentation.
this is what I've been doing:
>>> plain = pyme.core.Data('this is just some sample text\n')
>>> cipher = pyme.core.Data()
>>> c = pyme.core.Context()
>>> c.set_armor(1)
>>> name='[email protected]'
>>> c.op_keylist_start(name, 0)
>>> r = c.op_keylist_next()
>>> c.op_sign(???)
I don't know what to give as parameters, the op_sign
method tells me
>>> help(c.op_sign)
Help on function _funcwrap in module pyme.util:
_funcwrap(*args, **kwargs)
gpgme_op_sign(ctx, plain, sig, mode) -> gpgme_error_t
but I do not know how to create such objects.