]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Magicsig call for phpseclib\Math\BigInteger fixed
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 17 Jun 2016 21:47:00 +0000 (23:47 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 17 Jun 2016 21:47:00 +0000 (23:47 +0200)
plugins/OStatus/classes/Magicsig.php

index d7c7c3844212384d65e0df6f66b16180e17cab77..639fe663b2b8b5187e71025b0cfc2bc77d59f468 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
-
-require_once 'Crypt/RSA.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 class Magicsig extends Managed_DataObject
 {
@@ -251,9 +247,9 @@ class Magicsig extends Managed_DataObject
     {
         $rsa = new \phpseclib\Crypt\RSA();
         $rsa->setHash($this->getHash());
-        $rsa->modulus = new Math_BigInteger(Magicsig::base64_url_decode($mod), 256);
+        $rsa->modulus = new \phpseclib\Math\BigInteger(Magicsig::base64_url_decode($mod), 256);
         $rsa->k = strlen($rsa->modulus->toBytes());
-        $rsa->exponent = new Math_BigInteger(Magicsig::base64_url_decode($exp), 256);
+        $rsa->exponent = new \phpseclib\Math\BigInteger(Magicsig::base64_url_decode($exp), 256);
 
         if ($type == 'private') {
             $this->privateKey = $rsa;