\Swift_Signers_DKIMSigner
DKIM Signer used to apply DKIM Signature to a message
- Author: Xavier De Cock <xdecock@gmail.com>
Synopsis
class Swift_Signers_DKIMSigner
implements
Swift_Signers_HeaderSigner
{
- // members
- protected string $_privateKey;
- protected string $_domainName;
- protected string $_selector;
- protected string $_hashAlgorithm;
- protected string $_bodyCanon;
- protected string $_headerCanon;
- protected array $_ignoredHeaders;
- protected unknown_type $_signerIdentity;
- protected integer $_bodyLen;
- protected int $_maxLen;
- protected boolean $_showLen;
- protected mixed $_signatureTimestamp;
- protected int $_signatureExpiration;
- protected boolean $_debugHeaders;
- protected array $_signedHeaders;
- private string $_debugHeadersData;
- private string $_bodyHash;
- protected Swift_Mime_Headers_ParameterizedHeader $_dkimHeader;
- private hash_ressource $_headerHashHandler;
- private $_bodyHashHandler;
- private $_headerHash;
- private string $_headerCanonData;
- private integer $_bodyCanonEmptyCounter;
- private integer $_bodyCanonIgnoreStart;
- private $_bodyCanonSpace;
- private $_bodyCanonLastChar;
- private string $_bodyCanonLine;
- private array $_bound;
- // methods
- public void __construct()
- public void reset()
- public int write()
- public void commit()
- public void bind()
- public void unbind()
- public void flushBuffers()
- public Swift_Signers_DKIMSigner setHashAlgorithm()
- public Swift_Signers_DKIMSigner setBodyCanon()
- public Swift_Signers_DKIMSigner setHeaderCanon()
- public Swift_Signers_DKIMSigner setSignerIdentity()
- public Swift_Signers_DKIMSigner setBodySignedLen()
- public Swift_Signers_DKIMSigner setSignatureTimestamp()
- public Swift_Signers_DKIMSigner setSignatureExpiration()
- public Swift_Signers_DKIMSigner setDebugHeaders()
- public void startBody()
- public void endBody()
- public array getAlteredHeaders()
- public Swift_Signers_DKIMSigner ignoreHeader()
- public Swift_Signers_DKIMSigner setHeaders()
- public Swift_Signers_DKIMSigner addSignature()
- protected void _addHeader()
- protected void _endOfHeaders()
- protected void _canonicalizeBody()
- protected void _endOfBody()
- private void _addToBodyHash()
- private void _addToHeaderHash()
- private void _getEncryptedHash()
Hierarchy
Implements
Members
private
- $_bodyCanonEmptyCounter
- $_bodyCanonIgnoreStart
- $_bodyCanonLastChar
- $_bodyCanonLine
- $_bodyCanonSpace
- $_bodyHash
—
string
Stores the bodyHash - $_bodyHashHandler
- $_bound
- $_debugHeadersData
—
string
If debugHeaders is set store debugDatas here - $_headerCanonData
- $_headerHash
- $_headerHashHandler
—
hash_ressource
Hash Handler
protected
- $_bodyCanon
—
string
Body canon method - $_bodyLen
—
int
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
—
int
Maximum signedLen - $_privateKey
—
string
PrivateKey - $_selector
—
string
Selector - $_showLen
—
boolean
Embbed bodyLen in signature - $_signatureExpiration
—
int
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
—
unknown_type
Signer identity
Methods
private
protected
public
- __construct() — Constructor
- addSignature() — Add the signature to the given Headers
- bind() — 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() — Returns the list of Headers Tampered by this plugin
- ignoreHeader() — Adds an ignored Header
- reset()
- setBodyCanon() — Set the body canonicalization algorithm
- setBodySignedLen() — Set the length of the body to sign
- setDebugHeaders() — Enable / disable the DebugHeaders
- setHashAlgorithm() — Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256
- setHeaderCanon() — Set the header canonicalization algorithm
- setHeaders() — Set the headers to sign
- setSignatureExpiration() — Set the signature expiration timestamp
- setSignatureTimestamp() — Set the signature timestamp
- setSignerIdentity() — Set the signer identity
- startBody() — Start Body
- unbind() — Remove an already bound stream.
- write() — Writes $bytes to the end of the stream.