public function DKIM_HeaderC($signHeader)
{
$signHeader = preg_replace('/\\r\\n\\s+/', ' ', $signHeader);
$lines = explode("\r\n", $signHeader);
foreach ($lines as $key => $line) {
list($heading, $value) = explode(':', $line, 2);
$heading = strtolower($heading);
$value = preg_replace('/\\s{2,}/', ' ', $value);
// Compress useless spaces
$lines[$key] = $heading . ':' . trim($value);
// Don't forget to remove WSP around the value
}
$signHeader = implode("\r\n", $lines);
return $signHeader;
}