mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-20 04:00:55 +00:00
Tests (DES): i didn't realize last commit included all the changes that it did
not all of them were ready to go out. i just meant for it to include a one-line change. meh.
This commit is contained in:
parent
c8281dd4a3
commit
8f27aaa323
@ -22,9 +22,7 @@ class Unit_Crypt_DES_TestCase extends PhpseclibTestCase
|
||||
$result = pack('H*', '3e7613642049af1e');
|
||||
|
||||
$internal = $des->encrypt('d');
|
||||
if (!$this->assertEquals($result, $internal)) {
|
||||
$this->assertEquals($result, $internal, 'Failed asserting that the internal engine produced the correct result');
|
||||
}
|
||||
$this->assertEquals($result, $internal, 'Failed asserting that the internal engine produced the correct result');
|
||||
|
||||
$des->setPreferredEngine(CRYPT_ENGINE_MCRYPT);
|
||||
if ($des->getEngine() == CRYPT_ENGINE_MCRYPT) {
|
||||
@ -57,10 +55,13 @@ class Unit_Crypt_DES_TestCase extends PhpseclibTestCase
|
||||
$des->setPreferredEngine(CRYPT_ENGINE_INTERNAL);
|
||||
$internal = $des->decrypt('d');
|
||||
|
||||
$result = pack('H*', '36a86ebd0f9e048f');
|
||||
$this->assertEquals($result, $internal, 'Failed asserting that the internal engine produced the correct result');
|
||||
|
||||
$des->setPreferredEngine(CRYPT_ENGINE_MCRYPT);
|
||||
if ($des->getEngine() == CRYPT_ENGINE_MCRYPT) {
|
||||
$mcrypt = $des->decrypt('d');
|
||||
$this->assertEquals($internal, $mcrypt, 'Failed asserting that the internal and mcrypt engines produce identical results');
|
||||
$this->assertEquals($result, $mcrypt, 'Failed asserting that the mcrypt engine produced the correct result');
|
||||
} else {
|
||||
self::markTestSkipped('Unable to initialize mcrypt engine');
|
||||
}
|
||||
@ -68,7 +69,7 @@ class Unit_Crypt_DES_TestCase extends PhpseclibTestCase
|
||||
$des->setPreferredEngine(CRYPT_ENGINE_OPENSSL);
|
||||
if ($des->getEngine() == CRYPT_ENGINE_OPENSSL) {
|
||||
$openssl = $des->decrypt('d');
|
||||
$this->assertEquals($internal, $openssl, 'Failed asserting that the internal and OpenSSL engines produce identical results');
|
||||
$this->assertEquals($result, $openssl, 'Failed asserting that the OpenSSL engine produced the correct result');
|
||||
} else {
|
||||
self::markTestSkipped('Unable to initialize OpenSSL engine');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user