PHP Class Swift_Signers_DomainKeySigner

Author: Xavier De Cock ([email protected])
Inheritance: implements Swift_Signers_HeaderSigner
Afficher le fichier Open project: swiftmailer/swiftmailer

Protected Properties

Свойство Type Description
$canon string Canonisation method.
$debugHeaders boolean Must we embed signed headers?
$domainKeyHeader Swift_Mime_Headers_ParameterizedHeader Stores the signature header.
$domainName string DomainName.
$hashAlgorithm string Hash algorithm used.
$ignoredHeaders array Headers not being signed.
$privateKey string PrivateKey.
$selector string Selector.
$signerIdentity string Signer identity.

Méthodes publiques

Méthode Description
__construct ( string $privateKey, string $domainName, string $selector ) Constructor.
addSignature ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DomainKeySigner Add the signature to the given Headers.
bind ( Swift_InputByteStream $is ) : Swift_Signers_DomainKeySigner Attach $is to this stream.
commit ( ) : Swift_Signers_DomainKeySigner For any bytes that are currently buffered inside the stream, force them off the buffer.
endBody ( ) End Body.
flushBuffers ( ) : Swift_Signers_DomainKeySigner 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_DomainKeySigner Adds an ignored Header.
reset ( ) : Swift_Signers_DomainKeySigner Resets internal states.
setCanon ( string $canon ) : Swift_Signers_DomainKeySigner Set the canonicalization algorithm.
setDebugHeaders ( boolean $debug ) : Swift_Signers_DomainKeySigner Enable / disable the DebugHeaders.
setHashAlgorithm ( string $hash ) : Swift_Signers_DomainKeySigner Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256.
setHeaders ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DomainKeySigner Set the headers to sign.
setSignerIdentity ( string $identity ) : Swift_Signers_DomainKeySigner Set the signer identity.
startBody ( ) Start Body.
unbind ( Swift_InputByteStream $is ) : Swift_Signers_DomainKeySigner Remove an already bound stream.
write ( string $bytes ) : Swift_Signers_DomainKeySigner Writes $bytes to the end of the stream.

Méthodes protégées

Méthode Description
addHeader ( $header ) * Private helpers
canonicalizeBody ( $string )
endOfBody ( )
endOfHeaders ( )

Private Methods

Méthode Description
addToHash ( $string )
getEncryptedHash ( ) : string
startHash ( )

Method Details

__construct() public méthode

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

addHeader() protected méthode

* Private helpers
protected addHeader ( $header )

addSignature() public méthode

Add the signature to the given Headers.
public addSignature ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DomainKeySigner
$headers Swift_Mime_HeaderSet
Résultat Swift_Signers_DomainKeySigner

bind() public méthode

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 ) : Swift_Signers_DomainKeySigner
$is Swift_InputByteStream
Résultat Swift_Signers_DomainKeySigner

canonicalizeBody() protected méthode

protected canonicalizeBody ( $string )

commit() public méthode

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

endBody() public méthode

End Body.
public endBody ( )

endOfBody() protected méthode

protected endOfBody ( )

endOfHeaders() protected méthode

protected endOfHeaders ( )

flushBuffers() public méthode

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public flushBuffers ( ) : Swift_Signers_DomainKeySigner
Résultat Swift_Signers_DomainKeySigner

getAlteredHeaders() public méthode

Returns the list of Headers Tampered by this plugin.
public getAlteredHeaders ( ) : array
Résultat array

ignoreHeader() public méthode

Adds an ignored Header.
public ignoreHeader ( string $header_name ) : Swift_Signers_DomainKeySigner
$header_name string
Résultat Swift_Signers_DomainKeySigner

reset() public méthode

Resets internal states.
public reset ( ) : Swift_Signers_DomainKeySigner
Résultat Swift_Signers_DomainKeySigner

setCanon() public méthode

Set the canonicalization algorithm.
public setCanon ( string $canon ) : Swift_Signers_DomainKeySigner
$canon string simple | nofws defaults to simple
Résultat Swift_Signers_DomainKeySigner

setDebugHeaders() public méthode

Enable / disable the DebugHeaders.
public setDebugHeaders ( boolean $debug ) : Swift_Signers_DomainKeySigner
$debug boolean
Résultat Swift_Signers_DomainKeySigner

setHashAlgorithm() public méthode

Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256.
public setHashAlgorithm ( string $hash ) : Swift_Signers_DomainKeySigner
$hash string
Résultat Swift_Signers_DomainKeySigner

setHeaders() public méthode

Set the headers to sign.
public setHeaders ( Swift_Mime_HeaderSet $headers ) : Swift_Signers_DomainKeySigner
$headers Swift_Mime_HeaderSet
Résultat Swift_Signers_DomainKeySigner

setSignerIdentity() public méthode

Set the signer identity.
public setSignerIdentity ( string $identity ) : Swift_Signers_DomainKeySigner
$identity string
Résultat Swift_Signers_DomainKeySigner

startBody() public méthode

Start Body.
public startBody ( )

unbind() public méthode

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 ) : Swift_Signers_DomainKeySigner
$is Swift_InputByteStream
Résultat Swift_Signers_DomainKeySigner

write() public méthode

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 ) : Swift_Signers_DomainKeySigner
$bytes string
Résultat Swift_Signers_DomainKeySigner

Property Details

$canon protected_oe property

Canonisation method.
protected string $canon
Résultat string

$debugHeaders protected_oe property

Must we embed signed headers?
protected bool $debugHeaders
Résultat boolean

$domainKeyHeader protected_oe property

Stores the signature header.
protected Swift_Mime_Headers_ParameterizedHeader $domainKeyHeader
Résultat Swift_Mime_Headers_ParameterizedHeader

$domainName protected_oe property

DomainName.
protected string $domainName
Résultat string

$hashAlgorithm protected_oe property

Hash algorithm used.
protected string $hashAlgorithm
Résultat string

$ignoredHeaders protected_oe property

Headers not being signed.
protected array $ignoredHeaders
Résultat array

$privateKey protected_oe property

PrivateKey.
protected string $privateKey
Résultat string

$selector protected_oe property

Selector.
protected string $selector
Résultat string

$signerIdentity protected_oe property

Signer identity.
protected string $signerIdentity
Résultat string