DkimSigner
class DkimSigner implements Signer
Signs email messages using DKIM (DomainKeys Identified Mail).
Constants
| private DefaultSignHeaders |
|
| private DkimSignature |
|
Methods
No description
Returns the signed message as a string with the DKIM-Signature header prepended.
Builds the DKIM-Signature header value.
Canonicalizes the selected headers, signs them, and returns the complete DKIM-Signature header string.
Signs the value with the RSA private key and returns the base64-encoded signature.
Computes the base64-encoded SHA-256 hash of the canonicalized body.
Normalizes line endings to CRLF and ensures the body ends with a single CRLF.
No description
Details
at line 33
__construct(string $domain, string $selector, string $privateKey, string|null $passPhrase = null, array $signHeaders = self::DefaultSignHeaders)
No description
at line 53
string
generateSignedMessage(Message $message)
Returns the signed message as a string with the DKIM-Signature header prepended.
at line 70
protected string
getSignature(Message $message, string $header, string $body)
Builds the DKIM-Signature header value.
at line 98
protected string
computeSignature(string $rawHeader, string $signature)
Canonicalizes the selected headers, signs them, and returns the complete DKIM-Signature header string.
at line 127
protected string
sign(string $value)
Signs the value with the RSA private key and returns the base64-encoded signature.
at line 145
protected string
computeBodyHash(string $body)
Computes the base64-encoded SHA-256 hash of the canonicalized body.
at line 159
protected string
normalizeNewLines(string $s)
Normalizes line endings to CRLF and ensures the body ends with a single CRLF.
at line 168
protected array
getSignedHeaders(Message $message)
No description
at line 174
protected int
getTime()
No description