Smutty


Smutty.Smutty_GPG

Class Smutty_GPG

Smutty_Object
|
+--Smutty_GPG

public class Smutty_GPG
extends Smutty_Object

this class provides some functions for dealing with the gpg keyring (if there is one).

unless otherwise specified, it will create it's own keyring directory in the application folder.

/


Constructor Summary

Smutty_GPG(mixed homedir)

constructor.

Method Summary
static Smutty_GPG

getInstance()

returns the singleton instance of this class

Smutty_GPG_PublicKey

import(String key)

imports a public key into the keyring.

array

listKeys()

lists the keys in the keyring.

Smutty_GPG_ValidSignature

verify(String sig)

verifies a signature with the keyring.

Constructor Detail

Smutty_GPG

public Smutty_GPG(mixed homedir)

constructor. makes sure everything is set up ok. creates the keyring directory if it doesn't exist.


Method Detail

getInstance

public static Smutty_GPG getInstance()

returns the singleton instance of this class

Returns:
the singleton
Go to code

import

public Smutty_GPG_PublicKey import(String key)

imports a public key into the keyring. returns a boolean indicating if it went ok or not.

Parameters:
key - the public key to import
Returns:
the imported key
Go to code

listKeys

public array listKeys()

lists the keys in the keyring. returns an array of Smutty_GPG_Key objects.

Returns:
Smutty_GPG_Key's
Go to code

verify

public Smutty_GPG_ValidSignature verify(String sig)

verifies a signature with the keyring. if the sig is valid then it'll return a Smutty_GPG_ValidSignature object with all the info about the sig. otherwise it'll return false.

Parameters:
sig - the signature to verify
Returns:
a valid sig object
Go to code

Smutty