Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Feb 22, 2024
1 parent 5b70acc commit 3cc3d1d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/MCryptCompatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ public function testMcryptGenericWithTwoParamsPHPPost71()
phpseclib_mcrypt_generic_init($td, 'xxx');
}

public function testOldMcryptNoIV()
public function testOldMcryptNoIVWarning()
{
$key = 'key';
$data = 'data';
Expand All @@ -836,7 +836,18 @@ public function testOldMcryptNoIV()
phpseclib_mcrypt_helper_old('rijndael-128', $key, $data, 'cbc', $iv, 'encrypt');
}

public function testOldMcryptShortIV()
public function testOldMcryptNoIV()
{
$key = 'key';
$data = 'data';
$iv = 'iv';

$result = @phpseclib_mcrypt_helper_old('rijndael-128', $key, $data, 'cbc', $iv, 'encrypt');

$this->assertEquals('69c48f0bce2c81abd64bbab839080574', bin2hex($compat));
}

public function testOldMcryptShortIVWarning()
{
$key = 'key';
$data = 'data';
Expand Down

0 comments on commit 3cc3d1d

Please sign in to comment.