protected function endOfBody() { // Add trailing Line return if last line is non empty if (strlen($this->bodyCanonLine) > 0) { $this->addToBodyHash("\r\n"); } $this->bodyHash = hash_final($this->bodyHashHandler, true); }