mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
Merge branch '2.0'
This commit is contained in:
commit
ac8960d049
@ -413,7 +413,7 @@ class RC2 extends Base
|
||||
return $result;
|
||||
}
|
||||
|
||||
return parent::encrypt($ciphertext);
|
||||
return parent::decrypt($ciphertext);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,5 +122,8 @@ class Unit_Crypt_RC2Test extends PhpseclibTestCase
|
||||
|
||||
$result = bin2hex($rc2->encrypt(pack('H*', $plaintext)));
|
||||
$this->assertEquals($result, $ciphertext, "Failed asserting that $plaintext yielded expected output in $engineName engine");
|
||||
|
||||
$result = bin2hex($rc2->decrypt(pack('H*', $ciphertext)));
|
||||
$this->assertEquals($result, $plaintext, "Failed asserting that decrypted result yielded $plaintext as a result in $engineName engine");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user