PHP Class Horde_Pgp_Mime, horde

Author: Michael Slusarz ([email protected])
Inheritance: extends Horde_Pgp
Mostrar archivo Open project: horde/horde

Public Methods

Method Description
armorToPart ( mixed $input, array $opts = [] ) : mixed Converts armored input into a Horde_Mime_Part object.
encryptPart ( Horde_Mime_Part $part, array $opts = [] ) : Horde_Mime_Part Encrypts a MIME part using PGP.
publicKeyPart ( mixed $key ) : Horde_Mime_Part Generate a Horde_Mime_Part object that contains a public key (RFC 3156 [7]).
signAndEncryptPart ( Horde_Mime_Part $part, mixed $privkey, array $opts = [] ) : Horde_Mime_Part Signs and encrypts a MIME part using PGP.
signPart ( Horde_Mime_Part $part, mixed $key, array $opts = [] ) : Horde_Mime_Part Signs a MIME part using PGP.

Protected Methods

Method Description
_encryptBase ( Horde_Pgp_Element_Message $encrypted ) : Horde_Mime_Part Create the base MIME part used for encryption (RFC 3156 [4]).
_encryptPart ( $data, $opts ) : Horde_Mime_Part Create the base MIME part used for encryption (RFC 3156 [4]).
_signPart ( $part, $detach_sig )

Method Details

_encryptBase() protected method

Create the base MIME part used for encryption (RFC 3156 [4]).
protected _encryptBase ( Horde_Pgp_Element_Message $encrypted ) : Horde_Mime_Part
$encrypted Horde_Pgp_Element_Message Encrypted data.
return Horde_Mime_Part Base encrypted MIME part.

_encryptPart() protected method

Create the base MIME part used for encryption (RFC 3156 [4]).
protected _encryptPart ( $data, $opts ) : Horde_Mime_Part
return Horde_Mime_Part Base encrypted MIME part.

_signPart() protected method

protected _signPart ( $part, $detach_sig )

armorToPart() public method

Converts armored input into a Horde_Mime_Part object.
public armorToPart ( mixed $input, array $opts = [] ) : mixed
$input mixed Armored input.
$opts array Additional options: - charset: (string) Charset of the armored input.
return mixed Either null if no PGP data was found, or a Horde_Mime_Part object.

encryptPart() public method

Encrypts a MIME part using PGP.
public encryptPart ( Horde_Mime_Part $part, array $opts = [] ) : Horde_Mime_Part
$part Horde_Mime_Part The object to encrypt.
$opts array Additional options: - cipher: (string) Default symmetric cipher algorithm to use. - compress: (string) Default compression algorithm. - pubkeys: (mixed) The public key(s) to use for encryption. - symmetric: (string) If set, use as symmetric key.
return Horde_Mime_Part An encrypted object.

publicKeyPart() public method

Generate a Horde_Mime_Part object that contains a public key (RFC 3156 [7]).
public publicKeyPart ( mixed $key ) : Horde_Mime_Part
$key mixed The public key.
return Horde_Mime_Part An object that contains the public key.

signAndEncryptPart() public method

Signs and encrypts a MIME part using PGP.
public signAndEncryptPart ( Horde_Mime_Part $part, mixed $privkey, array $opts = [] ) : Horde_Mime_Part
$part Horde_Mime_Part The part to sign and encrypt.
$privkey mixed The private key to use for signing (must be decrypted).
$opts array Additional options: - cipher: (string) Default symmetric cipher algorithm to use. - compress: (string) Default compression algorithm. - pubkeys: (mixed) The public key(s) to use for encryption. - symmetric: (string) If set, use as symmetric key.
return Horde_Mime_Part A signed and encrypted part.

signPart() public method

Signs a MIME part using PGP.
public signPart ( Horde_Mime_Part $part, mixed $key, array $opts = [] ) : Horde_Mime_Part
$part Horde_Mime_Part The object to sign.
$key mixed The private key to use for signing (must be decrypted).
$opts array Additional options: - compress: (string) Default compression algorithm.
return Horde_Mime_Part A signed object.