converted toString to new crypt library
This commit is contained in:
parent
23d44c7d59
commit
c5bb41176e
@ -110,14 +110,11 @@ class Magicsig extends Memcached_DataObject
|
|||||||
|
|
||||||
public function toString($full_pair = true)
|
public function toString($full_pair = true)
|
||||||
{
|
{
|
||||||
$public_key = $this->_rsa->_public_key;
|
$mod = base64_url_encode($this->publicKey->modulus->toBytes());
|
||||||
$private_key = $this->_rsa->_private_key;
|
$exp = base64_url_encode($this->publicKey->exponent->toBytes());
|
||||||
|
|
||||||
$mod = base64_url_encode($public_key->getModulus());
|
|
||||||
$exp = base64_url_encode($public_key->getExponent());
|
|
||||||
$private_exp = '';
|
$private_exp = '';
|
||||||
if ($full_pair && $private_key->getExponent()) {
|
if ($full_pair && $private_key->getExponent()) {
|
||||||
$private_exp = '.' . base64_url_encode($private_key->getExponent());
|
$private_exp = '.' . base64_url_encode($this->privateKey->exponent->toBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'RSA.' . $mod . '.' . $exp . $private_exp;
|
return 'RSA.' . $mod . '.' . $exp . $private_exp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user