Browse Source

Fix indentation .. again ;-)

pull/9184/head
Philipp 1 week ago
parent
commit
4db45aca06
No known key found for this signature in database GPG Key ID: 9A28B7D4FF5667BD
2 changed files with 8 additions and 10 deletions
  1. +4
    -5
      src/Util/Crypto.php
  2. +4
    -5
      tests/src/Util/CryptoTest.php

+ 4
- 5
src/Util/Crypto.php View File

@@ -73,11 +73,10 @@ class Crypto
public static function meToPem($m, $e)
{
$rsa = new RSA();
$rsa->loadKey(
[
'e' => new BigInteger($e, 256),
'n' => new BigInteger($m, 256)
]);
$rsa->loadKey([
'e' => new BigInteger($e, 256),
'n' => new BigInteger($m, 256)
]);
return $rsa->getPublicKey();
}



+ 4
- 5
tests/src/Util/CryptoTest.php View File

@@ -90,11 +90,10 @@ class CryptoTest extends TestCase
Crypto::pemToMe($key, $m, $e);

$expectedRSA = new RSA();
$expectedRSA->loadKey(
[
'e' => new BigInteger($e, 256),
'n' => new BigInteger($m, 256)
]);
$expectedRSA->loadKey([
'e' => new BigInteger($e, 256),
'n' => new BigInteger($m, 256)
]);

$this->assertEquals($expectedRSA->getPublicKey(), $key);
}


Loading…
Cancel
Save