| |
- pyme.util.GpgmeWrapper(__builtin__.object)
-
- Context
- Data
class Context(pyme.util.GpgmeWrapper) |
|
From the GPGME C documentation:
* All cryptographic operations in GPGME are performed within a
* context, which contains the internal state of the operation as well as
* configuration parameters. By using several contexts you can run
* several cryptographic operations in parallel, with different
* configuration.
Thus, this is the place that you will usually start. |
|
- Method resolution order:
- Context
- pyme.util.GpgmeWrapper
- __builtin__.object
Methods defined here:
- __del__(self)
- __init__(self, wrapped=None)
- get_key(self, fpr, secret)
- Return the key corresponding to the fingerprint 'fpr'
- op_edit(self, key, func, fnc_value, out)
- Start key editing using supplied callback function
- op_keylist_all(self, *args, **kwargs)
- op_keylist_next(self)
- Returns the next key in the list created
by a call to op_keylist_start(). The object returned
is of type Key.
- op_trustlist_all(self, *args, **kwargs)
- op_trustlist_next(self)
- Returns the next trust item in the list created
by a call to op_trustlist_start(). The object returned
is of type TrustItem.
- set_passphrase_cb(self, func, hook=None)
- Sets the passphrase callback to the function specified by func.
When the system needs a passphrase, it will call func with three args:
hint, a string describing the key it needs the passphrase for;
desc, a string describing the passphrase it needs;
prev_bad, a boolean equal True if this is a call made after
unsuccessful previous attempt.
If hook has a value other than None it will be passed into the func
as a forth argument.
Please see the GPGME manual for more information.
- set_progress_cb(self, func, hook=None)
- Sets the progress meter callback to the function specified by
This function will be called to provide an interactive update of
the system's progress.
Please see the GPGME manual for more information.
- wait(self, hang)
- Wait for asynchronous call to finish. Wait forever if hang is True
Return:
On an async call completion its return status.
On timeout - None.
Please read the GPGME manual for more information.
Methods inherited from pyme.util.GpgmeWrapper:
- __eq__(self, other)
- __getattr__(self, name)
- On-the-fly function generation.
- __hash__(self)
- __repr__(self)
- __str__(self)
Data and other attributes inherited from pyme.util.GpgmeWrapper:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'GpgmeWrapper' objects>
- list of weak references to the object (if defined)
|
class Data(pyme.util.GpgmeWrapper) |
|
From the GPGME C manual:
* A lot of data has to be exchanged between the user and the crypto
* engine, like plaintext messages, ciphertext, signatures and information
* about the keys. The technical details about exchanging the data
* information are completely abstracted by GPGME. The user provides and
* receives the data via `gpgme_data_t' objects, regardless of the
* communication protocol between GPGME and the crypto engine in use.
This Data class is the implementation of the GpgmeData objects.
Please see the information about __init__ for instantiation. |
|
- Method resolution order:
- Data
- pyme.util.GpgmeWrapper
- __builtin__.object
Methods defined here:
- __del__(self)
- __init__(self, string=None, file=None, offset=None, length=None, cbs=None)
- Initialize a new gpgme_data_t object.
If no args are specified, make it an empty object.
If string alone is specified, initialize it with the data
contained there.
If file, offset, and length are all specified, file must
be either a filename or a file-like object, and the object
will be initialized by reading the specified chunk from the file.
If cbs is specified, it MUST be a tuple of the form:
((read_cb, write_cb, seek_cb, release_cb), hook)
where func is a callback function taking two arguments (count,
hook) and returning a string of read data, or None on EOF.
This will supply the read() method for the system.
If file is specified without any other arguments, then
it must be a filename, and the object will be initialized from
that file.
Any other use will result in undefined or erroneous behavior.
- new(self)
- new_from_cbs(self, funcs, hook)
- Argument funcs must be a 4 element tuple with callbacks:
(read_cb, write_cb, seek_cb, release_cb)
- new_from_fd(self, file)
- This wraps the GPGME gpgme_data_new_from_fd() function.
The argument "file" may be a file-like object, supporting the fileno()
call and the mode attribute.
- new_from_file(self, filename, copy=1)
- new_from_filepart(self, file, offset, length)
- This wraps the GPGME gpgme_data_new_from_filepart() function.
The argument "file" may be:
1. a string specifying a file name, or
3. a a file-like object. supporting the fileno() call and the mode
attribute.
- new_from_mem(self, string, copy=1)
- new_from_stream(self, file)
- This wrap around gpgme_data_new_from_stream is an alias for
new_from_fd() method since in python there's not difference
between file stream and file descriptor
- read(self, size=-1)
- Read at most size bytes, returned as a string.
If the size argument is negative or omitted, read until EOF is reached.
Returns the data read, or the empty string if there was no data
to read before EOF was reached.
- write(self, buffer)
Methods inherited from pyme.util.GpgmeWrapper:
- __eq__(self, other)
- __getattr__(self, name)
- On-the-fly function generation.
- __hash__(self)
- __repr__(self)
- __str__(self)
Data and other attributes inherited from pyme.util.GpgmeWrapper:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'GpgmeWrapper' objects>
- list of weak references to the object (if defined)
| |