magicsig shuffling
This commit is contained in:
parent
17b8020d25
commit
9494b0e5d7
|
@ -27,8 +27,6 @@
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'magicsig.php';
|
|
||||||
|
|
||||||
class MagicEnvelope
|
class MagicEnvelope
|
||||||
{
|
{
|
||||||
const ENCODING = 'base64url';
|
const ENCODING = 'base64url';
|
||||||
|
@ -64,7 +62,7 @@ class MagicEnvelope
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$signature_alg = new MagicsigRsaSha256($this->getKeyPair($signer_uri));
|
$signature_alg = Magicsig::fromString($this->getKeyPair($signer_uri));
|
||||||
$armored_text = base64_encode($text);
|
$armored_text = base64_encode($text);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
@ -139,7 +137,7 @@ class MagicEnvelope
|
||||||
$text = base64_decode($env['data']);
|
$text = base64_decode($env['data']);
|
||||||
$signer_uri = $this->getAuthor($text);
|
$signer_uri = $this->getAuthor($text);
|
||||||
|
|
||||||
$verifier = new MagicsigRsaSha256($this->getKeyPair($signer_uri));
|
$verifier = Magicsig::fromString($this->getKeyPair($signer_uri));
|
||||||
|
|
||||||
return $verifier->verify($env['data'], $env['sig']);
|
return $verifier->verify($env['data'], $env['sig']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user