Skip to content

Instantly share code, notes, and snippets.

@lkdocs
Last active December 22, 2015 20:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lkdocs/6526704 to your computer and use it in GitHub Desktop.
Save lkdocs/6526704 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