PHP Класс Swift_Signers_DKIMSigner

Автор: Xavier De Cock ([email protected])
Наследование: implements Swift_Signers_HeaderSigner
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$bodyCanon string Body canon method.
$bodyLen integer BodyLength.
$debugHeaders boolean Must we embed signed headers?
$dkimHeader Swift_Mime_Headers_ParameterizedHeader Stores the signature header.
$domainName string DomainName.
$hashAlgorithm string Hash algorithm used.
$headerCanon string Header canon method.
$ignoredHeaders array Headers not being signed.
$maxLen integer Maximum signedLen.
$privateKey string PrivateKey.
$selector string Selector.
$showLen boolean Embbed bodyLen in signature.
$signatureExpiration integer When will the signature expires false means not embedded, if sigTimestamp is auto Expiration is relative, otherwhise it's absolute.
$signatureTimestamp mixed When the signature has been applied (true means time()), false means not embedded.
$signedHeaders array Headers used to generate hash.
$signerIdentity string Signer identity.

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

Метод Описание
__construct ( string $privateKey, string $domainName, string $selector ) Constructor.
addSignature ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DKIMSigner Add the signature to the given Headers.
bind ( Swift_InputByteStream $is ) Attach $is to this stream.
commit ( ) For any bytes that are currently buffered inside the stream, force them off the buffer.
endBody ( ) End Body.
flushBuffers ( ) Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
getAlteredHeaders ( ) : array Returns the list of Headers Tampered by this plugin.
ignoreHeader ( string $header_name ) : Swift_Signers_DKIMSigner Adds an ignored Header.
reset ( ) Reset the Signer.
setBodyCanon ( string $canon ) : Swift_Signers_DKIMSigner Set the body canonicalization algorithm.
setBodySignedLen ( mixed $len ) : Swift_Signers_DKIMSigner Set the length of the body to sign.
setDebugHeaders ( boolean $debug ) : Swift_Signers_DKIMSigner Enable / disable the DebugHeaders.
setHashAlgorithm ( string $hash ) : Swift_Signers_DKIMSigner Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256.
setHeaderCanon ( string $canon ) : Swift_Signers_DKIMSigner Set the header canonicalization algorithm.
setHeaders ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DKIMSigner Set the headers to sign.
setSignatureExpiration ( integer $time ) : Swift_Signers_DKIMSigner Set the signature expiration timestamp.
setSignatureTimestamp ( integer $time ) : Swift_Signers_DKIMSigner Set the signature timestamp.
setSignerIdentity ( string $identity ) : Swift_Signers_DKIMSigner Set the signer identity.
startBody ( ) Start Body.
unbind ( Swift_InputByteStream $is ) Remove an already bound stream.
write ( string $bytes ) : integer Writes $bytes to the end of the stream.

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

Метод Описание
addHeader ( $header, $is_sig = false ) * Private helpers
canonicalizeBody ( $string )
endOfBody ( )

Приватные методы

Метод Описание
addToBodyHash ( $string )
addToHeaderHash ( $header )
getEncryptedHash ( ) : string

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

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

Constructor.
public __construct ( string $privateKey, string $domainName, string $selector )
$privateKey string
$domainName string
$selector string

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

* Private helpers
protected addHeader ( $header, $is_sig = false )

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

Add the signature to the given Headers.
public addSignature ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DKIMSigner
$headers Swift_Mime_HeaderSet
Результат Swift_Signers_DKIMSigner

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

The stream acts as an observer, receiving all data that is written. All {@link write()} and {@link flushBuffers()} operations will be mirrored.
public bind ( Swift_InputByteStream $is )
$is Swift_InputByteStream

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

protected canonicalizeBody ( $string )

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

For any bytes that are currently buffered inside the stream, force them off the buffer.
public commit ( )

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

End Body.
public endBody ( )

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

protected endOfBody ( )

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

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public flushBuffers ( )

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

Returns the list of Headers Tampered by this plugin.
public getAlteredHeaders ( ) : array
Результат array

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

Adds an ignored Header.
public ignoreHeader ( string $header_name ) : Swift_Signers_DKIMSigner
$header_name string
Результат Swift_Signers_DKIMSigner

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

Reset the Signer.
См. также: Swift_Signer::reset()
public reset ( )

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

Set the body canonicalization algorithm.
public setBodyCanon ( string $canon ) : Swift_Signers_DKIMSigner
$canon string
Результат Swift_Signers_DKIMSigner

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

Set the length of the body to sign.
public setBodySignedLen ( mixed $len ) : Swift_Signers_DKIMSigner
$len mixed (bool or int)
Результат Swift_Signers_DKIMSigner

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

Enable / disable the DebugHeaders.
public setDebugHeaders ( boolean $debug ) : Swift_Signers_DKIMSigner
$debug boolean
Результат Swift_Signers_DKIMSigner

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

Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256.
public setHashAlgorithm ( string $hash ) : Swift_Signers_DKIMSigner
$hash string
Результат Swift_Signers_DKIMSigner

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

Set the header canonicalization algorithm.
public setHeaderCanon ( string $canon ) : Swift_Signers_DKIMSigner
$canon string
Результат Swift_Signers_DKIMSigner

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

Set the headers to sign.
public setHeaders ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DKIMSigner
$headers Swift_Mime_HeaderSet
Результат Swift_Signers_DKIMSigner

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

Set the signature expiration timestamp.
public setSignatureExpiration ( integer $time ) : Swift_Signers_DKIMSigner
$time integer A timestamp
Результат Swift_Signers_DKIMSigner

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

Set the signature timestamp.
public setSignatureTimestamp ( integer $time ) : Swift_Signers_DKIMSigner
$time integer A timestamp
Результат Swift_Signers_DKIMSigner

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

Set the signer identity.
public setSignerIdentity ( string $identity ) : Swift_Signers_DKIMSigner
$identity string
Результат Swift_Signers_DKIMSigner

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

Start Body.
public startBody ( )

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

If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.
public unbind ( Swift_InputByteStream $is )
$is Swift_InputByteStream

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

Writing may not happen immediately if the stream chooses to buffer. If you want to write these bytes with immediate effect, call {@link commit()} after calling write(). This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).
public write ( string $bytes ) : integer
$bytes string
Результат integer

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

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

Body canon method.
protected string $bodyCanon
Результат string

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

BodyLength.
protected int $bodyLen
Результат integer

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

Must we embed signed headers?
protected bool $debugHeaders
Результат boolean

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

Stores the signature header.
protected Swift_Mime_Headers_ParameterizedHeader $dkimHeader
Результат Swift_Mime_Headers_ParameterizedHeader

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

DomainName.
protected string $domainName
Результат string

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

Hash algorithm used.
protected string $hashAlgorithm
Результат string

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

Header canon method.
protected string $headerCanon
Результат string

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

Headers not being signed.
protected array $ignoredHeaders
Результат array

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

Maximum signedLen.
protected int $maxLen
Результат integer

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

PrivateKey.
protected string $privateKey
Результат string

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

Selector.
protected string $selector
Результат string

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

Embbed bodyLen in signature.
protected bool $showLen
Результат boolean

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

When will the signature expires false means not embedded, if sigTimestamp is auto Expiration is relative, otherwhise it's absolute.
protected int $signatureExpiration
Результат integer

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

When the signature has been applied (true means time()), false means not embedded.
protected mixed $signatureTimestamp
Результат mixed

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

Headers used to generate hash.
protected array $signedHeaders
Результат array

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

Signer identity.
protected string $signerIdentity
Результат string