PHP Class OpenPGP_Crypt_RSA, horde

Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$key
$message

Public Methods

Method Description
__construct ( $packet ) Construct a wrapper object from a key or a message packet
convert_key ( $packet, $private = false )
convert_private_key ( $packet )
convert_public_key ( $packet )
crypt_rsa_key ( $mod, $exp, $hash = 'SHA256' )
decrypt ( $packet )
key ( $keyid = NULL )
private_key ( $keyid = NULL ) Get Crypt_RSA for the private key
public_key ( $keyid = NULL ) Get Crypt_RSA for the public key
sign ( $packet, $hash = 'SHA256', $keyid = NULL ) Third parameter is the 16-digit key ID to use.
sign_key_userid ( $packet, $hash = 'SHA256', $keyid = NULL ) TODO: merge this with the normal sign function
try_decrypt_session ( $key, $edata )
verify ( $packet ) Second optional parameter to specify which signature to verify (if there is more than one)

Method Details

__construct() public method

Construct a wrapper object from a key or a message packet
public __construct ( $packet )

convert_key() static public method

static public convert_key ( $packet, $private = false )

convert_private_key() static public method

static public convert_private_key ( $packet )

convert_public_key() static public method

static public convert_public_key ( $packet )

crypt_rsa_key() static public method

static public crypt_rsa_key ( $mod, $exp, $hash = 'SHA256' )

decrypt() public method

public decrypt ( $packet )

key() public method

public key ( $keyid = NULL )

private_key() public method

Get Crypt_RSA for the private key
public private_key ( $keyid = NULL )

public_key() public method

Get Crypt_RSA for the public key
public public_key ( $keyid = NULL )

sign() public method

.. defaults to the key id in the key packet
public sign ( $packet, $hash = 'SHA256', $keyid = NULL )

sign_key_userid() public method

TODO: merge this with the normal sign function
public sign_key_userid ( $packet, $hash = 'SHA256', $keyid = NULL )

try_decrypt_session() static public method

static public try_decrypt_session ( $key, $edata )

verify() public method

Second optional parameter to specify which signature to verify (if there is more than one)
public verify ( $packet )

Property Details

$key protected property

protected $key

$message protected property

protected $message