Class: Crypt_GPG_Driver_GnuPG
Source Location: /Crypt_GPG-0.6.0/GPG/Driver/GnuPG.php
Crypt_GPG
|
--Crypt_GPG_Driver_GnuPG
PECL gnupg Crypt_GPG driver
Author(s):
Copyright:
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
__construct (Constructor) [line 165]
Crypt_GPG_Driver_GnuPG __construct(
[array
$options = array()])
|
|
Creates a new GPG object that uses the gnupg PECL extension to control the GPG process Developers are encouraged to use the Crypt_GPG::factory() method to instantiate this class. Available options for this driver are: - string homedir: The directory where the GPG keyring files are
stored. If not specified, GPG uses the default of
$HOME/.gnupg, where $HOME is the present user's
home directory. This option only needs to be
specified when $HOME/.gnupg is inappropriate.
Overrides Crypt_GPG::__construct() (Creates a new Crypt_GPG object)
Parameters:
decrypt [line 568]
string decrypt(
string
$encrypted_data, [string
$passphrase = null])
|
|
Decrypts string data using the given passphrase This method assumes the required private key is available in the keyring and throws an exception if the private key is not available. To add a private key to the keyring, use the Crypt_GPG::importKey() method.
Overrides Crypt_GPG::decrypt() (Decrypts string data using the given passphrase)
Parameters:
deletePrivateKey [line 360]
void deletePrivateKey(
string
$key_id)
|
|
Deletes a private key from the keyring If more than one key fingerprint is avaliable for the specified $key_id (for example, if you use a non-unique uid) only the first private key is deleted. Since the gnupg PECL extension does not support deleting private keys without also deleting the associated public keys, this method is handed off to the native PHP GPG driver.
Overrides Crypt_GPG::deletePrivateKey() (Deletes a private key from the keyring)
Parameters:
deletePublicKey [line 305]
void deletePublicKey(
string
$key_id)
|
|
Deletes a public key from the keyring If more than one key fingerprint is avaliable for the specified $key_id (for example, if you use a non-unique uid) only the first public key is deleted.
Overrides Crypt_GPG::deletePublicKey() (Deletes a public key from the keyring)
Parameters:
encrypt [line 507]
string encrypt(
string
$key_id, string
$data, [boolean
$armor = true])
|
|
Encrypts string data Data is ASCII armored by default but may optionally be returned as binary.
Overrides Crypt_GPG::encrypt() (Encrypts string data)
Parameters:
exportPublicKey [line 272]
string exportPublicKey(
string
$key_id, [boolean
$armor = true])
|
|
Exports a public key from the keyring The exported key remains on the keyring. To delete the public key, use Crypt_GPG::deletePublicKey(). If more than one key fingerprint is avaliable for the specified $key_id (for example, if you use a non-unique uid) only the first public key is exported. Since the gnupg PECL extension does not support exporting keys, this method is handed off to the native PHP GPG driver.
Overrides Crypt_GPG::exportPublicKey() (Exports a public key from the keyring)
Parameters:
getFingerprint [line 448]
string getFingerprint(
string
$key_id, [integer
$format = Crypt_GPG::FORMAT_NONE])
|
|
Gets a key fingerprint from the keyring If more than one key fingerprint is avaliable (for example, if you use a non-unique user id) only the first key fingerprint is returned.
Overrides Crypt_GPG::getFingerprint() (Gets a key fingerprint from the keyring)
Parameters:
getKeys [line 383]
array getKeys(
[string
$key_id = ''])
|
|
Gets the available keys in the keyring
Overrides Crypt_GPG::getKeys() (Gets the available keys in the keyring)
Parameters:
importKey [line 214]
sign [line 666]
string sign(
string
$key_id, string
$data, [string
$passphrase = null], [boolean
$mode = Crypt_GPG::SIGN_MODE_NORMAL], [boolean
$armor = true])
|
|
Signs data using the given key and passphrase Data may be signed using any one of the three available signing modes:
Overrides Crypt_GPG::sign() (Signs data using the given key and passphrase)
Parameters:
verify [line 738]
Verifies signed data The Crypt_GPG::decrypt() method may be used to get the original message if the signed data is not clearsigned and does not have a detached signature.
Overrides Crypt_GPG::verify() (Verifies signed data)
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:19:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|