1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-15 02:17:04 +01:00

Tests/RSA: add additional assert for MSBLOBs

This commit is contained in:
terrafrost 2020-01-18 17:31:10 -06:00
parent 112a210f4d
commit e3efc1cf51

View File

@ -440,6 +440,7 @@ Private-MAC: 35134b7434bf828b21404099861d455e660e8740';
$plaintext = 'zzz'; $plaintext = 'zzz';
$privKey = PublicKeyLoader::load($key); $privKey = PublicKeyLoader::load($key);
$this->assertSame($key, $privKey->toString('MSBLOB'));
$this->assertInstanceOf(PrivateKey::class, $privKey); $this->assertInstanceOf(PrivateKey::class, $privKey);
$this->assertSame($privKey->getLoadedFormat(), 'MSBLOB'); $this->assertSame($privKey->getLoadedFormat(), 'MSBLOB');
$this->assertGreaterThanOrEqual(1, strlen("$privKey")); $this->assertGreaterThanOrEqual(1, strlen("$privKey"));