CodeExplorer canonicalizeHeader example
unset($headersToIgnore['from'
]);
$signedHeaderNames =
[];
$headerCanonData = '';
$headers =
$message->
getPreparedHeaders();
foreach ($headers->
getNames() as $name) { foreach ($headers->
all($name) as $header) { if (isset($headersToIgnore[strtolower($header->
getName())])) { continue;
} if ('' !==
$header->
getBodyAsString()) { $headerCanonData .=
$this->
canonicalizeHeader($header->
toString(),
$options['header_canon'
]);
$signedHeaderNames[] =
$header->
getName();
} } } [$bodyHash,
$bodyLength] =
$this->
hashBody($message->
getBody(),
$options['body_canon'
],
$options['body_max_length'
]);
$params =
[ 'v' => '1',
'q' => 'dns/txt',
'a' =>
$options['algorithm'
],
unset($headersToIgnore['from'
]);
$signedHeaderNames =
[];
$headerCanonData = '';
$headers =
$message->
getPreparedHeaders();
foreach ($headers->
getNames() as $name) { foreach ($headers->
all($name) as $header) { if (isset($headersToIgnore[strtolower($header->
getName())])) { continue;
} if ('' !==
$header->
getBodyAsString()) { $headerCanonData .=
$this->
canonicalizeHeader($header->
toString(),
$options['header_canon'
]);
$signedHeaderNames[] =
$header->
getName();
} } } [$bodyHash,
$bodyLength] =
$this->
hashBody($message->
getBody(),
$options['body_canon'
],
$options['body_max_length'
]);
$params =
[ 'v' => '1',
'q' => 'dns/txt',
'a' =>
$options['algorithm'
],