mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 13:07:53 +00:00
$x & 3 == 1 is the same thing as $x & (3 == 1) per php's order of precidence
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@24 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
736bfab276
commit
1eb6ac05c0
@ -53,7 +53,7 @@
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: DES.php,v 1.6 2009-02-16 22:22:13 terrafrost Exp $
|
||||
* @version $Id: DES.php,v 1.7 2009-03-09 05:13:24 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -508,7 +508,7 @@ class Crypt_DES {
|
||||
$length = strlen($text);
|
||||
|
||||
if (!$this->padding) {
|
||||
if ($length & 7 == 0) {
|
||||
if (($length & 7) == 0) {
|
||||
return $text;
|
||||
} else {
|
||||
user_error("The plaintext's length ($length) is not a multiple of the block size (8)", E_USER_NOTICE);
|
||||
|
@ -47,7 +47,7 @@
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMVII Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: TripleDES.php,v 1.5 2009-02-16 22:22:13 terrafrost Exp $
|
||||
* @version $Id: TripleDES.php,v 1.6 2009-03-09 05:13:24 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -563,7 +563,7 @@ class Crypt_TripleDES {
|
||||
$length = strlen($text);
|
||||
|
||||
if (!$this->padding) {
|
||||
if ($length & 7 == 0) {
|
||||
if (($length & 7) == 0) {
|
||||
return $text;
|
||||
} else {
|
||||
user_error("The plaintext's length ($length) is not a multiple of the block size (8)", E_USER_NOTICE);
|
||||
|
Loading…
Reference in New Issue
Block a user