PHP 클래스 Swift_Signers_SMimeSigner, Halite

저자: Romain-Geissler
저자: Sebastiaan Stok ([email protected])
상속: implements Swift_Signers_BodySigner
파일 보기 프로젝트 열기: HaliteChallenge/Halite 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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