Class GPGME::GpgmeCtx
In: lib/gpgme.rb
Parent: Object

A context within which all cryptographic operations are performed.

Methods
add_signer    armor    armor=    clear_signers    decrypt    delete    each_keys    encrypt    export    genkey    import    keylist_end    keylist_mode    keylist_mode=    keylist_next    keylist_start    new    protocol    protocol=    set_passphrase_cb    set_progress_cb    sign    textmode    textmode=    verify   
Attributes
passphrase_cb  [R] 

An array which contains a Proc and an Object. The former is the passphrase callback and the latter is hook value passed to it.

progress_cb  [R] 

An array which contains a Proc and an Object. The former is the progress callback used when progress information is available and the latter is hook value passed to it.

Public Class methods
new()

Create a new GpgmeCtx object.

Public Instance methods
protocol=(proto)

Set the protocol used within this context.

protocol()

Return the protocol used within this context.

armor=(yes)

Tell whether the output should be ASCII armored.

armor()

Return true if the output is ASCII armored.

textmode=(yes)

Tell whether canonical text mode should be used.

textmode()

Return true if canonical text mode is enabled.

keylist_mode=(mode)

Change the default behaviour of the key listing functions.

keylist_mode()

Returns the current key listing mode.

set_passphrase_cb(passfunc, hook_value = nil)

Set the passphrase callback with given hook value.

set_progress_cb(progfunc, hook_value = nil)

Set the progress callback with given hook value.

keylist_start(pattern = nil, secret_only = false)

Initiates a key listing operation for given pattern. If pattern is nil, all available keys are returned. If secret_only is true, the list is restricted to secret keys only.

keylist_next()

Returns the next key in the list created by a previous keylist_start operation.

keylist_end()

End a pending key list operation.

each_keys(pattern = nil, secret_only = false, &block) {|keylist_next| ...}

Convenient method to iterate over keylist.

genkey(parms, store = false)

Generates a new key pair. If store is true, this method puts the key pair into the standard key ring.

export(recipients)

Extracts the public keys of the recipients.

import(keydata)

Add the keys in the data buffer to the key ring.

delete(key, allow_secret = false)

Delete the key from the key ring. If allow_secret is false, only public keys are deleted, otherwise secret keys are deleted as well.

decrypt(cipher)

Decrypt the ciphertext and return the plaintext.

verify(sig, plain)

Verify that the signature in the data object is a valid signature.

clear_signers()

Removes the list of signers from this object.

add_signer(key)

Add the key to the list of signers.

sign(plain, mode = GPGME::GPGME_SIG_MODE_NORMAL)

Create a signature for the text in the data object.

encrypt(rset, plain)

Encrypt the plaintext in the data object for the recipients and return the ciphertext.