Replace library/ASNValue.class.php with phpseclib functions

This commit is contained in:
Philipp Holzer 2020-09-12 20:54:37 +02:00
commit 90346f61ba
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
3 changed files with 22 additions and 226 deletions

View file

@ -73,7 +73,7 @@ class CryptoTest extends TestCase
}
public function datePem()
public function dataPEM()
{
return [
'diaspora' => [
@ -83,7 +83,7 @@ class CryptoTest extends TestCase
}
/**
* @dataProvider datePem
* @dataProvider dataPEM
*/
public function testPemToMe(string $key)
{
@ -97,6 +97,18 @@ class CryptoTest extends TestCase
$this->assertEquals($expectedRSA->getPublicKey(), $key);
}
/**
* @dataProvider dataPEM
*/
public function testMeToPem(string $key)
{
Crypto::pemToMe($key, $m, $e);
$checkKey = Crypto::meToPem($m, $e);
$this->assertEquals($key, $checkKey);
}
}
/**