X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FPublicRSAKey.php;h=fb1eeeb2782deb99bb6cc1cc76a1cbf18e64be30;hb=40777d08c198ed5f435a7b029e25ea139de62c16;hp=523ab174fbf785d42995a61e5ead8de3a2d1f299;hpb=4a22034be6550bfcd469ccd2de7e866dd4d0a8a7;p=friendica.git diff --git a/src/Module/PublicRSAKey.php b/src/Module/PublicRSAKey.php index 523ab174fb..fb1eeeb278 100644 --- a/src/Module/PublicRSAKey.php +++ b/src/Module/PublicRSAKey.php @@ -23,11 +23,9 @@ namespace Friendica\Module; use Friendica\BaseModule; use Friendica\Core\System; -use Friendica\DI; use Friendica\Model\User; use Friendica\Network\HTTPException\BadRequestException; -use Friendica\Util\Crypto; -use Friendica\Util\Strings; +use Friendica\Protocol\Salmon; /** * prints the public RSA key of a user @@ -47,9 +45,10 @@ class PublicRSAKey extends BaseModule throw new BadRequestException(); } - Crypto::pemToMe($user['spubkey'], $modulus, $exponent); - - $content = 'RSA' . '.' . Strings::base64UrlEncode($modulus, true) . '.' . Strings::base64UrlEncode($exponent, true); - System::httpExit($content, Response::TYPE_BLANK, 'application/magic-public-key'); + System::httpExit( + Salmon::salmonKey($user['spubkey']), + Response::TYPE_BLANK, + 'application/magic-public-key' + ); } }