mirror of
https://github.com/friendica/friendica
synced 2025-05-05 15:04:09 +02:00
Fix indentation .. again ;-)
This commit is contained in:
parent
9d9489494e
commit
4db45aca06
2 changed files with 8 additions and 10 deletions
|
@ -73,11 +73,10 @@ class Crypto
|
||||||
public static function meToPem($m, $e)
|
public static function meToPem($m, $e)
|
||||||
{
|
{
|
||||||
$rsa = new RSA();
|
$rsa = new RSA();
|
||||||
$rsa->loadKey(
|
$rsa->loadKey([
|
||||||
[
|
'e' => new BigInteger($e, 256),
|
||||||
'e' => new BigInteger($e, 256),
|
'n' => new BigInteger($m, 256)
|
||||||
'n' => new BigInteger($m, 256)
|
]);
|
||||||
]);
|
|
||||||
return $rsa->getPublicKey();
|
return $rsa->getPublicKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,11 +90,10 @@ class CryptoTest extends TestCase
|
||||||
Crypto::pemToMe($key, $m, $e);
|
Crypto::pemToMe($key, $m, $e);
|
||||||
|
|
||||||
$expectedRSA = new RSA();
|
$expectedRSA = new RSA();
|
||||||
$expectedRSA->loadKey(
|
$expectedRSA->loadKey([
|
||||||
[
|
'e' => new BigInteger($e, 256),
|
||||||
'e' => new BigInteger($e, 256),
|
'n' => new BigInteger($m, 256)
|
||||||
'n' => new BigInteger($m, 256)
|
]);
|
||||||
]);
|
|
||||||
|
|
||||||
$this->assertEquals($expectedRSA->getPublicKey(), $key);
|
$this->assertEquals($expectedRSA->getPublicKey(), $key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue