Constructor.
Horde_Crypt_pgp
Horde_Crypt_pgp
([array $params = array()])
-
array
$params: Parameter array containing the path to the GnuPG binary (key = 'program') and to a temporary directory.
Decrypts text using PGP.
string
decrypt
(string $text, [array $params = array()])
-
string
$text: The text to be PGP decrypted.
-
array
$params: The parameters needed for decryption. See the individual _decrypt*() functions for the parameter requirements.
Redefinition of:
- Horde_Crypt::decrypt()
- Decrypt the requested data.
Encrypts text using PGP.
string
encrypt
(string $text, [array $params = array()])
-
string
$text: The text to be PGP encrypted.
-
array
$params: The parameters needed for encryption. See the individual _encrypt*() functions for the parameter requirements.
Redefinition of:
- Horde_Crypt::encrypt()
- Encrypt the requested data.
Returns whether a text has been encrypted symmetrically.
boolean
encryptedSymmetrically
(string $text)
-
string
$text: The PGP encrypted text.
Encrypts a MIME_Part using PGP.
-
MIME_Part
$mime_part: The MIME_Part object to encrypt.
-
array
$params: The parameters required for encryption.
Generates a personal Public/Private keypair combination.
array
generateKey
(string $realname, string $email, string $passphrase, [string $comment = ''], [integer $keylength = 1024])
-
string
$realname: The name to use for the key.
-
string
$email: The email to use for the key.
-
string
$passphrase: The passphrase to use for the key.
-
string
$comment: The comment to use for the key.
-
integer
$keylength: The keylength to use for the key.
Generates a revocation certificate.
string
generateRevocation
(string $key, string $email, string $passphrase)
-
string
$key: The private key.
-
string
$email: The email to use for the key.
-
string
$passphrase: The passphrase to use for the key.
Get the fingerprints from a key block.
array
getFingerprintsFromKey
(string $pgpdata)
-
string
$pgpdata: The PGP data block.
Returns the first matching key ID for an email address from a public keyserver.
string
getKeyID
(string $address, [string $server = PGP_KEYSERVER_PUBLIC], [float $timeout = PGP_KEYSERVER_TIMEOUT])
-
string
$address: The email address of the PGP key.
-
string
$server: The keyserver to use.
-
float
$timeout: The keyserver timeout.
Returns a PGP public key from a public keyserver.
string
getPublicKeyserver
(string $keyid, [string $server = PGP_KEYSERVER_PUBLIC], [float $timeout = PGP_KEYSERVER_TIMEOUT], [string $address = null])
-
string
$keyid: The key ID of the PGP key.
-
string
$server: The keyserver to use.
-
float
$timeout: The keyserver timeout.
-
string
$address: The email address of the PGP key. @since Horde 3.2.
Returns the short fingerprint (Key ID) of the key used to sign a block of PGP data.
string
getSignersFingerprint
(string $text)
-
string
$text: The PGP signed text block.
Returns the key ID of the key used to sign a block of PGP data.
string
getSignersKeyID
(string $text)
-
string
$text: The PGP signed text block.
Parses a message into text and PGP components.
array
parsePGPData
(string $text)
-
string
$text: The text to parse.
Returns information on a PGP data block.
array
pgpPacketInformation
(string $pgpdata)
-
string
$pgpdata: The PGP data block.
Returns only information on the first ID that matches the email address input.
array
pgpPacketSignature
(string $pgpdata, string $email)
-
string
$pgpdata: The PGP data block.
-
string
$email: An e-mail address.
Returns information on a PGP signature embedded in PGP data. Similar to pgpPacketSignature(), but returns information by unique User ID Index (format id{n} where n is an integer of 1 or greater).
array
pgpPacketSignatureByUidIndex
(string $pgpdata, string $uid_idx)
-
string
$pgpdata: See pgpPacketSignature().
-
string
$uid_idx: The UID index.
Returns human readable information on a PGP key.
string
pgpPrettyKey
(string $pgpdata)
-
string
$pgpdata: The PGP data block.
Generates a MIME_Part object, in accordance with RFC 2015/3156, that contains a public key.
-
string
$key: The public key.
Sends a PGP public key to a public keyserver.
PEAR_Error
putPublicKeyserver
(string $pubkey, [string $server = PGP_KEYSERVER_PUBLIC], [float $timeout = PGP_KEYSERVER_TIMEOUT])
-
string
$pubkey: The PGP public key
-
string
$server: The keyserver to use.
-
float
$timeout: The keyserver timeout.
Signs and encrypts a MIME_Part using PGP.
MIME_Part
signAndEncryptMIMEPart
(
MIME_Part $mime_part, [
array $sign_params =
array()], [
array $encrypt_params =
array()])
-
MIME_Part
$mime_part: The MIME_Part object to sign and encrypt.
-
array
$sign_params: The parameters required for signing.
-
array
$encrypt_params: The parameters required for encryption.
Signs a MIME_Part using PGP.
-
MIME_Part
$mime_part: The MIME_Part object to sign.
-
array
$params: The parameters required for signing.
Verify a passphrase for a given public/private keypair.
boolean
verifyPassphrase
(string $public_key, string $private_key, string $passphrase)
-
string
$public_key: The user's PGP public key.
-
string
$private_key: The user's PGP private key.
-
string
$passphrase: The user's passphrase.
void
_getKeyIDString
( $keyid)
void
_pgpPacketInformationHelper
( $a)
void
_pgpPrettyKeyFormatter
( &$s, $k, $m)
Inherited Methods
Inherited From Horde_Crypt
Horde_Crypt::decrypt()
Horde_Crypt::encrypt()
Horde_Crypt::factory()
Horde_Crypt::requireSecureConnection()
Horde_Crypt::singleton()