mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Tests/AES: rm test from 3.0 branch as 3.0 is super strict with size
This commit is contained in:
parent
1b954b7852
commit
eb456ee319
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user