Tests/AES: rm test from 3.0 branch as 3.0 is super strict with size

This commit is contained in:
terrafrost 2023-09-21 15:17:30 -05:00
parent 1b954b7852
commit eb456ee319
1 changed files with 0 additions and 29 deletions

View File

@ -387,35 +387,6 @@ abstract class TestCase extends PhpseclibTestCase
$this->assertSame($aes->getKeyLength(), 256);
}
public function testInvalidLengthKeyWithAES()
{
$plaintext = str_repeat('x', 16);
$aes = new Rijndael();
$aes->setKey(str_repeat('a', 19));
$this->assertSame($aes->getKeyLength(), 160);
$ref = new Rijndael();
$ref->setKey(str_repeat('a', 19) . "\0");
$this->assertSame(
bin2hex($aes->encrypt($plaintext)),
bin2hex($ref->encrypt($plaintext)),
'actual and expected value do not match for 168 bit Rijndael'
);
$aes = new AES();
$aes->setKey(str_repeat('a', 19));
$this->assertSame($aes->getKeyLength(), 192);
$ref = new AES();
$ref->setKey(str_repeat('a', 19) . "\0\0\0\0\0");
$this->assertSame(
bin2hex($aes->encrypt($plaintext)),
bin2hex($ref->encrypt($plaintext)),
'actual and expected value do not match for 168 bit AES'
);
}
/**
* @group github938
*/