PHP Класс Swift_Signers_SMimeSigner, Halite

Автор: Romain-Geissler
Автор: Sebastiaan Stok ([email protected])
Наследование: implements Swift_Signers_BodySigner
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$encryptCert
$encryptCipher
$encryptLevel
$encryptOptions
$extraCerts
$headerFactory Swift_Mime_HeaderFactory
$replacementFactory Swift_StreamFilters_StringReplacementFilterFactory
$signCertificate
$signLevel
$signOptions
$signPrivateKey
$signThenEncrypt

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

Метод Описание
__construct ( string | null $signCertificate = null, string | null $signPrivateKey = null, string | null $encryptCertificate = null ) Constructor.
getAlteredHeaders ( ) : array Return the list of header a signer might tamper.
getSignCertificate ( ) : string
getSignPrivateKey ( ) : string
isSignThenEncrypt ( ) : boolean
newInstance ( string $certificate = null, string $privateKey = null ) : Swift_Signers_SMimeSigner Returns an new Swift_Signers_SMimeSigner instance.
reset ( ) : Swift_Signers_SMimeSigner Resets internal states.
setEncryptCertificate ( string | array $recipientCerts, integer $cipher = null ) : Swift_Signers_SMimeSigner Set the certificate location to use for encryption.
setSignCertificate ( string $certificate, string | array $privateKey = null, integer $signOptions = PKCS7_DETACHED, string $extraCerts = null ) : Swift_Signers_SMimeSigner Set the certificate location to use for signing.
setSignThenEncrypt ( boolean $signThenEncrypt = true ) : Swift_Signers_SMimeSigner Set perform signing before encryption.
signMessage ( Swift_Message $message ) : Swift_Signers_SMimeSigner Change the Swift_Message to apply the signing.

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

Метод Описание
copyFromOpenSSLOutput ( Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream )
createMessage ( Swift_Message $message ) : Swift_Message
messageStreamToEncryptedByteStream ( Swift_FileStream $outputStream, Swift_InputByteStream $is )
messageStreamToSignedByteStream ( Swift_FileStream $outputStream, Swift_InputByteStream $inputStream )
streamToMime ( Swift_OutputByteStream $fromStream, Swift_Message $message ) Merges an OutputByteStream to Swift_Message.
toSMimeByteStream ( Swift_InputByteStream $inputStream, Swift_Message $message )

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

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

Constructor.
public __construct ( string | null $signCertificate = null, string | null $signPrivateKey = null, string | null $encryptCertificate = null )
$signCertificate string | null
$signPrivateKey string | null
$encryptCertificate string | null

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

protected copyFromOpenSSLOutput ( Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream )
$fromStream Swift_OutputByteStream
$toStream Swift_InputByteStream

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

protected createMessage ( Swift_Message $message ) : Swift_Message
$message Swift_Message
Результат Swift_Message

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

Return the list of header a signer might tamper.
public getAlteredHeaders ( ) : array
Результат array

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

public getSignCertificate ( ) : string
Результат string

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

public getSignPrivateKey ( ) : string
Результат string

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

public isSignThenEncrypt ( ) : boolean
Результат boolean

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

protected messageStreamToEncryptedByteStream ( Swift_FileStream $outputStream, Swift_InputByteStream $is )
$outputStream Swift_FileStream
$is Swift_InputByteStream

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

protected messageStreamToSignedByteStream ( Swift_FileStream $outputStream, Swift_InputByteStream $inputStream )
$outputStream Swift_FileStream
$inputStream Swift_InputByteStream

newInstance() публичный статический Метод

Returns an new Swift_Signers_SMimeSigner instance.
public static newInstance ( string $certificate = null, string $privateKey = null ) : Swift_Signers_SMimeSigner
$certificate string
$privateKey string
Результат Swift_Signers_SMimeSigner

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

Resets internal states.
public reset ( ) : Swift_Signers_SMimeSigner
Результат Swift_Signers_SMimeSigner

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

Set the certificate location to use for encryption.
public setEncryptCertificate ( string | array $recipientCerts, integer $cipher = null ) : Swift_Signers_SMimeSigner
$recipientCerts string | array Either an single X.509 certificate, or an assoc array of X.509 certificates.
$cipher integer
Результат Swift_Signers_SMimeSigner

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

Set the certificate location to use for signing.
public setSignCertificate ( string $certificate, string | array $privateKey = null, integer $signOptions = PKCS7_DETACHED, string $extraCerts = null ) : Swift_Signers_SMimeSigner
$certificate string
$privateKey string | array If the key needs an passphrase use array('file-location', 'passphrase') instead
$signOptions integer Bitwise operator options for openssl_pkcs7_sign()
$extraCerts string A file containing intermediate certificates needed by the signing certificate
Результат Swift_Signers_SMimeSigner

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

The default is to first sign the message and then encrypt. But some older mail clients, namely Microsoft Outlook 2000 will work when the message first encrypted. As this goes against the official specs, its recommended to only use 'encryption -> signing' when specifically targeting these 'broken' clients.
public setSignThenEncrypt ( boolean $signThenEncrypt = true ) : Swift_Signers_SMimeSigner
$signThenEncrypt boolean
Результат Swift_Signers_SMimeSigner

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

Change the Swift_Message to apply the signing.
public signMessage ( Swift_Message $message ) : Swift_Signers_SMimeSigner
$message Swift_Message
Результат Swift_Signers_SMimeSigner

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

Merges an OutputByteStream to Swift_Message.
protected streamToMime ( Swift_OutputByteStream $fromStream, Swift_Message $message )
$fromStream Swift_OutputByteStream
$message Swift_Message

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

protected toSMimeByteStream ( Swift_InputByteStream $inputStream, Swift_Message $message )
$inputStream Swift_InputByteStream
$message Swift_Message

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

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

protected $encryptCert

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

protected $encryptCipher

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

protected $encryptLevel

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

protected $encryptOptions

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

protected $extraCerts

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

protected Swift_Mime_HeaderFactory $headerFactory
Результат Swift_Mime_HeaderFactory

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

protected Swift_StreamFilters_StringReplacementFilterFactory $replacementFactory
Результат Swift_StreamFilters_StringReplacementFilterFactory

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

protected $signCertificate

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

protected $signLevel

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

protected $signOptions

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

protected $signPrivateKey

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

protected $signThenEncrypt