]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
converted toString to new crypt library
authorJames Walker <walkah@walkah.net>
Sat, 13 Mar 2010 00:42:48 +0000 (19:42 -0500)
committerJames Walker <walkah@walkah.net>
Sat, 13 Mar 2010 00:42:48 +0000 (19:42 -0500)
plugins/OStatus/classes/Magicsig.php

index d25b150e8b622de35530d1ed0fa947396ce9b01d..d1d6a6d4529d81de5229f1d3cfe13df4f12ea3e4 100644 (file)
@@ -110,14 +110,11 @@ class Magicsig extends Memcached_DataObject
 
     public function toString($full_pair = true)
     {
-        $public_key = $this->_rsa->_public_key;
-        $private_key = $this->_rsa->_private_key;
-
-        $mod = base64_url_encode($public_key->getModulus());
-        $exp = base64_url_encode($public_key->getExponent());
+        $mod = base64_url_encode($this->publicKey->modulus->toBytes());
+        $exp = base64_url_encode($this->publicKey->exponent->toBytes());
         $private_exp = '';
         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;