Methods summary
public
array
|
#
encryptList( )
Return the list of available encryption options for composing.
Return the list of available encryption options for composing.
Returns
array Keys are encryption type constants, values are gettext
strings describing the encryption type.
|
public
|
#
addPersonalPublicKey( mixed $key )
Add the personal public key to the prefs.
Add the personal public key to the prefs.
Parameters
- $key
- The public key to add (either string or array).
|
public
|
#
addPersonalPrivateKey( mixed $key )
Add the personal private key to the prefs.
Add the personal private key to the prefs.
Parameters
- $key
- The private key to add (either string or array).
|
public
|
#
addAdditionalCert( mixed $key )
Add the list of additional certs to the prefs.
Add the list of additional certs to the prefs.
Parameters
- $key
- The private key to add (either string or array).
|
public
string
|
#
getPersonalPublicKey( )
Get the personal public key from the prefs.
Get the personal public key from the prefs.
Returns
string The personal S/MIME public key.
|
public
string
|
#
getPersonalPrivateKey( )
Get the personal private key from the prefs.
Get the personal private key from the prefs.
Returns
string The personal S/MIME private key.
|
public
string
|
#
getAdditionalCert( )
Get any additional certificates from the prefs.
Get any additional certificates from the prefs.
Returns
string Additional signing certs for inclusion.
|
public
|
#
deletePersonalKeys( )
Deletes the specified personal keys from the prefs.
Deletes the specified personal keys from the prefs.
|
public
|
#
addPublicKey( string $cert )
Add a public key to an address book.
Add a public key to an address book.
Parameters
- $cert
- A public certificate to add.
Throws
Horde_Exception
|
public
array
|
#
publicKeyInfo( string $cert )
Get information about a public certificate.
Get information about a public certificate.
Parameters
- $cert
- The public certificate.
Returns
array Two element array: the name and e-mail for the cert.
Throws
Horde_Crypt_Exception
|
public
string
|
#
getPublicKey( string $address )
Retrieves a public key by e-mail.
The key will be retrieved from a user's address book(s).
Retrieves a public key by e-mail.
The key will be retrieved from a user's address book(s).
Parameters
- $address
- The e-mail address to search for.
Returns
string The S/MIME public key requested.
Throws
Horde_Exception
|
public
array
|
#
listPublicKeys( )
Retrieves all public keys from a user's address book(s).
Retrieves all public keys from a user's address book(s).
Returns
array All S/MIME public keys available.
Throws
Horde_Crypt_Exception
|
public
|
#
deletePublicKey( string $email )
Deletes a public key from a user's address book(s) by e-mail.
Deletes a public key from a user's address book(s) by e-mail.
Parameters
- $email
- The e-mail address to delete.
Throws
Horde_Crypt_Exception
|
public
stdClass
|
#
verifySignature( string $text )
Verifies a signed message with a given public key.
Verifies a signed message with a given public key.
Parameters
- $text
- The text to verify.
Returns
stdClass See Horde_Crypt_Smime::verify().
Throws
Horde_Crypt_Exception
|
public
string
|
#
decryptMessage( string $text )
Decrypt a message with user's public/private keypair.
Decrypt a message with user's public/private keypair.
Parameters
- $text
- The text to decrypt.
Returns
string See Horde_Crypt_Smime::decrypt().
Throws
Horde_Crypt_Exception
|
public
mixed
|
#
getPassphrase( )
Gets the user's passphrase from the session cache.
Gets the user's passphrase from the session cache.
Returns
mixed The passphrase, if set. Returns false if the passphrase
has not been loaded yet. Returns null if no passphrase
is needed.
|
public
boolean
|
#
storePassphrase( string $passphrase )
Store's the user's passphrase in the session cache.
Store's the user's passphrase in the session cache.
Parameters
- $passphrase
- The user's passphrase.
Returns
boolean Returns true if correct passphrase, false if incorrect.
|
public
|
#
unsetPassphrase( )
Clear the passphrase from the session cache.
Clear the passphrase from the session cache.
|
public
MIME_Part
|
#
IMPencryptMIMEPart( Horde_Mime_Part $mime_part, Horde_Mail_Rfc822_Address $to_address )
Encrypt a MIME_Part using S/MIME using IMP defaults.
Encrypt a MIME_Part using S/MIME using IMP defaults.
Parameters
- $mime_part
- The object to encrypt.
- $to_address
- <p>The e-mail address of the
key to use for encryption.</p>
Returns
MIME_Part See Horde_Crypt_Smime::encryptMIMEPart().
Throws
Horde_Crypt_Exception
|
public
MIME_Part
|
#
IMPsignMIMEPart( MIME_Part $mime_part )
Sign a MIME_Part using S/MIME using IMP defaults.
Sign a MIME_Part using S/MIME using IMP defaults.
Parameters
- $mime_part
- The MIME_Part object to sign.
Returns
MIME_Part See Horde_Crypt_Smime::signMIMEPart().
Throws
Horde_Crypt_Exception
|
public
MIME_Part
|
#
IMPsignAndEncryptMIMEPart( Horde_Mime_Part $mime_part, Horde_Mail_Rfc822_Address $to_address )
Sign and encrypt a MIME_Part using S/MIME using IMP defaults.
Sign and encrypt a MIME_Part using S/MIME using IMP defaults.
Parameters
- $mime_part
- <p>The object to sign and
encrypt.</p>
- $to_address
- <p>The e-mail address of the
key to use for encryption.</p>
Returns
MIME_Part See Horde_Crypt_Smime::signAndencryptMIMEPart().
Throws
Horde_Crypt_Exception
|
public
|
#
addFromPKCS12( string $pkcs12, string $password, string $pkpass = null )
Store the public/private/additional certificates in the preferences
from a given PKCS 12 file.
Store the public/private/additional certificates in the preferences
from a given PKCS 12 file.
Parameters
- $pkcs12
- The PKCS 12 data.
- $password
- The password of the PKCS 12 file.
- $pkpass
- The password to use to encrypt the private key.
Throws
Horde_Crypt_Exception
|