Magicsig call for phpseclib\Math\BigInteger fixed
This commit is contained in:
parent
1839082f95
commit
3a8ce99a9d
@ -27,11 +27,7 @@
|
||||
* @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;
|
||||
|
Loading…
Reference in New Issue
Block a user