Download latest PDF - Read the Docs

Transcript
alot Documentation, Release 0.3.6
(['path'], {'nargs':'?', 'help':'path to save to'})],
help='save attachment(s)')
class SaveAttachmentCommand(Command):
pass
Parameters
• mode (str) – mode identifier
• name (str) – command name to register as
• help (str) – help string summarizing what this command does
• usage (str) – overides the auto generated usage string
• forced (dict (str->str)) – keyword parameter used for commands constructor
• arguments (list of (list of str, dict (str->str)) – list of arguments given as pairs (args,
kwargs) accepted by argparse.ArgumentParser.add_argument().
4.7.1 Globals
4.7.2 Envelope
4.7.3 Bufferlist
4.7.4 Search
4.7.5 Taglist
4.7.6 Thread
4.8 Crypto
alot.crypto.RFC3156_micalg_from_algo(hash_algo)
Converts a GPGME hash algorithm name to one conforming to RFC3156.
GPGME returns hash algorithm names such as “SHA256”, but RFC3156 says that programs need to use names
such as “pgp-sha256” instead.
Parameters hash_algo – GPGME hash_algo
Return type str
alot.crypto.decrypt_verify(encrypted)
Decrypts the given ciphertext string and returns both the signatures (if any) and the plaintext.
Parameters encrypted – the mail to decrypt
Returns a tuple (sigs, plaintext) with sigs being a list of a gpgme.Signature and plaintext is a
str holding the decrypted mail
Raises GPGProblem if the decryption fails
alot.crypto.detached_signature_for(plaintext_str, key=None)
Signs the given plaintext string and returns the detached signature.
A detached signature in GPG speak is a separate blob of data containing a signature for the specified plaintext.
4.8. Crypto
65