Class Swift_Signers_DKIMSigner
Inheritance | Swift_Signers_DKIMSigner |
---|---|
Implements | Swift_Signers_HeaderSigner |
Subclasses | Swift_Signers_OpenDKIMSigner |
DKIM Signer used to apply DKIM Signature to a message.
Protected Properties
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Constructor. | Swift_Signers_DKIMSigner |
addSignature() | Add the signature to the given Headers. | Swift_Signers_DKIMSigner |
bind() | Attach $is to this stream. | Swift_Signers_DKIMSigner |
commit() | For any bytes that are currently buffered inside the stream, force them off the buffer. | Swift_Signers_DKIMSigner |
endBody() | End Body. | Swift_Signers_DKIMSigner |
flushBuffers() | Flush the contents of the stream (empty it) and set the internal pointer to the beginning. | Swift_Signers_DKIMSigner |
getAlteredHeaders() | Returns the list of Headers Tampered by this plugin. | Swift_Signers_DKIMSigner |
ignoreHeader() | Adds an ignored Header. | Swift_Signers_DKIMSigner |
newInstance() | Instanciate DKIMSigner. | Swift_Signers_DKIMSigner |
reset() | Reset the Signer. | Swift_Signers_DKIMSigner |
setBodyCanon() | Set the body canonicalization algorithm. | Swift_Signers_DKIMSigner |
setBodySignedLen() | Set the length of the body to sign. | Swift_Signers_DKIMSigner |
setDebugHeaders() | Enable / disable the DebugHeaders. | Swift_Signers_DKIMSigner |
setHashAlgorithm() | Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256. | Swift_Signers_DKIMSigner |
setHeaderCanon() | Set the header canonicalization algorithm. | Swift_Signers_DKIMSigner |
setHeaders() | Set the headers to sign. | Swift_Signers_DKIMSigner |
setSignatureExpiration() | Set the signature expiration timestamp. | Swift_Signers_DKIMSigner |
setSignatureTimestamp() | Set the signature timestamp. | Swift_Signers_DKIMSigner |
setSignerIdentity() | Set the signer identity. | Swift_Signers_DKIMSigner |
startBody() | Start Body. | Swift_Signers_DKIMSigner |
unbind() | Remove an already bound stream. | Swift_Signers_DKIMSigner |
write() | Writes $bytes to the end of the stream. | Swift_Signers_DKIMSigner |
Protected Methods
Method | Description | Defined By |
---|---|---|
_addHeader() | Swift_Signers_DKIMSigner | |
_canonicalizeBody() | Swift_Signers_DKIMSigner | |
_endOfBody() | Swift_Signers_DKIMSigner | |
_endOfHeaders() | Swift_Signers_DKIMSigner |
Property Details
Method Details
Constructor.
public void __construct ( $privateKey, $domainName, $selector ) | ||
$privateKey | string | |
$domainName | string | |
$selector | string |
protected void _addHeader ( $header, $is_sig = false ) | ||
$header | ||
$is_sig |
protected void _canonicalizeBody ( $string ) | ||
$string |
protected void _endOfBody ( ) |
protected void _endOfHeaders ( ) |
Add the signature to the given Headers.
public Swift_Signers_DKIMSigner addSignature ( Swift_Mime_HeaderSet $headers ) | ||
$headers | Swift_Mime_HeaderSet |
Attach $is to this stream.
The stream acts as an observer, receiving all data that is written. All {@link write()} and {@link flushBuffers()} operations will be mirrored.
public void bind ( Swift_InputByteStream $is ) | ||
$is | Swift_InputByteStream |
For any bytes that are currently buffered inside the stream, force them off the buffer.
public void commit ( ) | ||
throws | Swift_IoException |
---|
End Body.
public void endBody ( ) |
Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public void flushBuffers ( ) | ||
throws | Swift_IoException |
---|
Returns the list of Headers Tampered by this plugin.
public array getAlteredHeaders ( ) |
Adds an ignored Header.
public Swift_Signers_DKIMSigner ignoreHeader ( $header_name ) | ||
$header_name | string |
Instanciate DKIMSigner.
public static Swift_Signers_DKIMSigner newInstance ( $privateKey, $domainName, $selector ) | ||
$privateKey | string | |
$domainName | string | |
$selector | string |
Reset the Signer.
See also Swift_Signer::reset().
public void reset ( ) |
Set the body canonicalization algorithm.
public Swift_Signers_DKIMSigner setBodyCanon ( $canon ) | ||
$canon | string |
Set the length of the body to sign.
public Swift_Signers_DKIMSigner setBodySignedLen ( $len ) | ||
$len | mixed | (bool or int) |
Enable / disable the DebugHeaders.
public Swift_Signers_DKIMSigner setDebugHeaders ( $debug ) | ||
$debug | bool |
Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256.
public Swift_Signers_DKIMSigner setHashAlgorithm ( $hash ) | ||
$hash | string |
Set the header canonicalization algorithm.
public Swift_Signers_DKIMSigner setHeaderCanon ( $canon ) | ||
$canon | string |
Set the headers to sign.
public Swift_Signers_DKIMSigner setHeaders ( Swift_Mime_HeaderSet $headers ) | ||
$headers | Swift_Mime_HeaderSet |
Set the signature expiration timestamp.
public Swift_Signers_DKIMSigner setSignatureExpiration ( $time ) | ||
$time | \timestamp |
Set the signature timestamp.
public Swift_Signers_DKIMSigner setSignatureTimestamp ( $time ) | ||
$time | \timestamp |
Set the signer identity.
public Swift_Signers_DKIMSigner setSignerIdentity ( $identity ) | ||
$identity | string |
Start Body.
public void startBody ( ) |
Remove an already bound stream.
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 void unbind ( Swift_InputByteStream $is ) | ||
$is | Swift_InputByteStream |
Writes $bytes to the end of the stream.
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 int write ( $bytes ) | ||
$bytes | string | |
throws | Swift_IoException |
---|