CipherContext
Object Hierarchy:
Description:
[
CCode ( type_id =
"camel_cipher_context_get_type ()" ) ]
public class CipherContext :
Object
Encryption and digital signature interface.
CipherContext is an abstract base class that provides a unified interface for encrypting, signing, decrypting,
and verifying MimePart message parts.
Concrete implementations include GpgContext for OpenPGP/GnuPG and
SMIMEContext for S/MIME.
Each implementation sets protocol strings (sign_protocol, encrypt_protocol, key_protocol) that are used to populate the appropriate MIME
header fields in signed and encrypted parts.
Because a single message part may have multiple layers of signing or encryption using different algorithms, the validity result is
represented as a tree of CipherValidity structures, each describing the signature or
encryption status of one layer.
Content:
Properties:
Static methods:
Creation methods:
Methods:
- public async CipherValidity decrypt (MimePart ipart, MimePart opart, int io_priority, Cancellable? cancellable = null) throws Error
Asynchronously decrypts ipart into opart.
- public virtual CipherValidity decrypt_sync (MimePart ipart, MimePart opart, Cancellable? cancellable = null) throws Error
Decrypts ipart into opart.
- public async bool encrypt (string? userid, GenericArray<string> recipients, MimePart ipart, MimePart opart, int io_priority, Cancellable? cancellable = null) throws Error
Asynchronously encrypts the clear-text ipart and writes
the resulting cipher-text to opart.
- public virtual bool encrypt_sync (string? userid, GenericArray<string> recipients, MimePart ipart, MimePart opart, Cancellable? cancellable = null) throws Error
Encrypts the clear-text ipart and writes the resulting
cipher-text to opart.
- public unowned Session? get_session ()
- public virtual unowned string hash_to_id (CipherHash hash)
- public virtual CipherHash id_to_hash (string id)
- public async bool sign (string userid, CipherHash hash, MimePart ipart, MimePart opart, int io_priority, Cancellable? cancellable = null) throws Error
Asynchronously converts the (unsigned) part ipart into a
new self-contained MIME part opart.
- public virtual bool sign_sync (string userid, CipherHash hash, MimePart ipart, MimePart opart, Cancellable? cancellable = null) throws Error
Converts the (unsigned) part ipart into a new
self-contained MIME part opart.
- public async CipherValidity verify (MimePart ipart, int io_priority, Cancellable? cancellable = null) throws Error
Asynchronously verifies the signature.
- public virtual CipherValidity verify_sync (MimePart ipart, Cancellable? cancellable = null) throws Error
Verifies the signature.
Inherited Members:
All known members inherited from class GLib.Object