Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ucheng/eba26f31056d8e1ba256 to your computer and use it in GitHub Desktop.
Save ucheng/eba26f31056d8e1ba256 to your computer and use it in GitHub Desktop.
<?
public function rsa_verify_sign($key, $signature, $package) {
$rsa = new Crypt_RSA();
$rsa->setHash("sha256");
$rsa->setSignatureMode(CRYPT_RSA_SIGNATURE_PKCS1);
$rsa->loadKey($key);
$verify = $rsa->verify(base64_decode($package), $signature);
return $verify;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment