PHP Класс Horde_Crypt_Pgp_Backend_Binary, horde

NOTE: This class is NOT intended to be accessed outside of this package. There is NO guarantees that the API of this class will not change across versions.
Автор: Michael Slusarz ([email protected])
Наследование: extends Horde_Crypt_Pgp_Backend
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_gnupg array GnuPG program location/common options.
$_privateKeyring string Filename of the temporary private keyring.
$_publicKeyring string Filename of the temporary public keyring.
$_tempdir string The temporary directory to use.

Открытые методы

Метод Описание
__construct ( string $gnupg, string $temp = null ) Constructor.
_callGpg ( array $options, string $mode, array $input = [], boolean $output = false, boolean $stderr = false, boolean $parseable = false, boolean $verbose = false ) : stdClass Function that handles interfacing with the GnuPG binary.
decryptMessage ( $text, $params )
decryptSignature ( $text, $params )
encryptMessage ( $text, $params )
encryptSignature ( $text, $params )
generateKey ( $opts )
getFingerprintsFromKey ( $pgpdata )
getPublicKeyFromPrivateKey ( $data )
getSignersKeyID ( $text )
isEncryptedSymmetrically ( $text )
packetInfo ( $pgpdata )
packetInfoMultiple ( $pgpdata )

Защищенные методы

Метод Описание
_checkSignatureResult ( string $result, string $message = null ) : object Checks signature result from the GnuPG binary.
_createKeyring ( string $type = 'public' ) : string Creates a temporary gpg keyring.
_createTempFile ( string $descrip = 'horde-crypt', boolean $delete = true ) : string Create a temporary file that will be deleted at the end of this process.
_ensureResult ( object $result ) Checks whether there was some valid output.
_putInKeyring ( mixed $keys = [], string $type = 'public' ) : string Adds PGP keys to the keyring.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( string $gnupg, string $temp = null )
$gnupg string The path to the GnuPG binary.
$temp string Location of temporary directory.

_callGpg() публичный Метод

Function that handles interfacing with the GnuPG binary.
public _callGpg ( array $options, string $mode, array $input = [], boolean $output = false, boolean $stderr = false, boolean $parseable = false, boolean $verbose = false ) : stdClass
$options array Options and commands to pass to GnuPG.
$mode string 'r' to read from stdout, 'w' to write to stdin.
$input array Input to write to stdin.
$output boolean Collect and store output in object returned?
$stderr boolean Collect and store stderr in object returned?
$parseable boolean Is parseable output required? The gpg binary would be executed with C locale then.
$verbose boolean Run GnuPG with verbose flag?
Результат stdClass Class with members output, stderr, and stdout.

_checkSignatureResult() защищенный Метод

Checks signature result from the GnuPG binary.
protected _checkSignatureResult ( string $result, string $message = null ) : object
$result string The signature result.
$message string The decrypted message data.
Результат object See decryptSignature().

_createKeyring() защищенный Метод

Creates a temporary gpg keyring.
protected _createKeyring ( string $type = 'public' ) : string
$type string The type of key to analyze. 'public' or 'private'.
Результат string Command line keystring option to use with gpg program.

_createTempFile() защищенный Метод

Create a temporary file that will be deleted at the end of this process.
protected _createTempFile ( string $descrip = 'horde-crypt', boolean $delete = true ) : string
$descrip string Description string to use in filename.
$delete boolean Delete the file automatically?
Результат string Filename of a temporary file.

_ensureResult() защищенный Метод

Checks whether there was some valid output.
protected _ensureResult ( object $result )
$result object A result from _callGpg().

_putInKeyring() защищенный Метод

Adds PGP keys to the keyring.
protected _putInKeyring ( mixed $keys = [], string $type = 'public' ) : string
$keys mixed A single key or an array of key(s) to add to the keyring.
$type string The type of key(s) to add. 'public' or 'private'.
Результат string Command line keystring option to use with gpg program.

decryptMessage() публичный Метод

public decryptMessage ( $text, $params )

decryptSignature() публичный Метод

public decryptSignature ( $text, $params )

encryptMessage() публичный Метод

public encryptMessage ( $text, $params )

encryptSignature() публичный Метод

public encryptSignature ( $text, $params )

generateKey() публичный Метод

public generateKey ( $opts )

getFingerprintsFromKey() публичный Метод

public getFingerprintsFromKey ( $pgpdata )

getPublicKeyFromPrivateKey() публичный Метод

public getPublicKeyFromPrivateKey ( $data )

getSignersKeyID() публичный Метод

public getSignersKeyID ( $text )

isEncryptedSymmetrically() публичный Метод

public isEncryptedSymmetrically ( $text )

packetInfo() публичный Метод

public packetInfo ( $pgpdata )

packetInfoMultiple() публичный Метод

public packetInfoMultiple ( $pgpdata )

Описание свойств

$_gnupg защищенное свойство

GnuPG program location/common options.
protected array $_gnupg
Результат array

$_privateKeyring защищенное свойство

Filename of the temporary private keyring.
protected string $_privateKeyring
Результат string

$_publicKeyring защищенное свойство

Filename of the temporary public keyring.
protected string $_publicKeyring
Результат string

$_tempdir защищенное свойство

The temporary directory to use.
protected string $_tempdir
Результат string