]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
magicsig shuffling
authorJames Walker <walkah@walkah.net>
Tue, 23 Feb 2010 04:30:21 +0000 (23:30 -0500)
committerJames Walker <walkah@walkah.net>
Tue, 23 Feb 2010 04:30:32 +0000 (23:30 -0500)
plugins/OStatus/lib/magicenvelope.php

index 1ae80d70c18ab3f8079c72f788fec730d7adafb8..81f4609c5cd94a138ab795381486c967f0e00913 100644 (file)
@@ -27,8 +27,6 @@
  * @link      http://status.net/
  */
 
-require_once 'magicsig.php';
-
 class MagicEnvelope
 {
     const ENCODING = 'base64url';
@@ -64,7 +62,7 @@ class MagicEnvelope
             return false;
         }
 
-        $signature_alg = new MagicsigRsaSha256($this->getKeyPair($signer_uri));
+        $signature_alg = Magicsig::fromString($this->getKeyPair($signer_uri));
         $armored_text = base64_encode($text);
 
         return array(
@@ -139,7 +137,7 @@ class MagicEnvelope
         $text = base64_decode($env['data']);
         $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']);
     }