Forked from lkdocs/PHP phpseclib: Verify Signature Example.php
Created
September 22, 2015 17:05
-
-
Save ucheng/eba26f31056d8e1ba256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
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