public function createHash(string $payload, Key $key) : string { $key = openssl_get_privatekey($key->getContent(), $key->getPassphrase()); $this->validateKey($key); $signature = ''; openssl_sign($payload, $signature, $key, $this->getAlgorithm()); return $signature; }