key = $key; $this->body = $body; } private function __hmacsha256() { $hash = hash_hmac('sha256', $this->body, $this->key, true); return base64_encode($hash); } public function genEventSig() { return $this->__hmacsha256(); } }