Skip to content

Commit

Permalink
add unit test for phpseclib created PKCS8 Ed25519 private keys
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Dec 17, 2019
1 parent 320189d commit fd8389f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Unit/Crypt/EC/KeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ public function testEd25519PrivateKey()
WEKBIBm/RAlphM3+hUG6wWfcO5bIUIaqMLa2ywxcOK1wMWbh
-----END PRIVATE KEY-----';
$this->assertSame($expected, $key->toString('PKCS8'));

$expected = EC::createKey('Ed25519')->toString('PKCS8');
$key = PublicKeyLoader::load($expected);
$this->assertSame('Ed25519', $key->getCurve());
$this->assertSame('Ed25519', $key->getPublicKey()->getCurve());
}

public function testPuTTYnistp256()
Expand Down

0 comments on commit fd8389f

Please sign in to comment.