Replace library/ASNValue.class.php with phpseclib functions
This commit is contained in:
parent
11ef3895f5
commit
90346f61ba
3 changed files with 22 additions and 226 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue