/**
* @param string $message
* @param string $signature
*
* @throws RuntimeException
*
* @return bool
*/
public function isValid($message,
$signature) { $pubkeyid =
$this->
getKeyResource();
$signature =
base64_decode($signature);
// State whether signature is okay or not
$ok =
openssl_verify($message,
$signature,
$pubkeyid);
if ($ok === 1
) { return true;
} if ($ok === 0
) { return false;
}