Skip to content

Commit

Permalink
Fixed mx on windows x64.
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Mar 2, 2016
1 parent 766edc7 commit 3906dd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xxtea.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| Roger M. Needham |
| |
| Code Author: Ma Bingyao <[email protected]> |
| LastModified: Mar 10, 2015 |
| LastModified: Mar 2, 2016 |
| |
\**********************************************************/

Expand Down Expand Up @@ -52,7 +52,7 @@ private static function int32($n) {
}

private static function mx($sum, $y, $z, $p, $e, $k) {
return (($z >> 5 ^ $y << 2) + ($y >> 3 ^ $z << 4)) ^ (($sum ^ $y) + ($k[$p & 3 ^ $e] ^ $z));
return ((($z >> 5 & 0x07ffffff) ^ $y << 2) + (($y >> 3 & 0x1fffffff) ^ $z << 4)) ^ (($sum ^ $y) + ($k[$p & 3 ^ $e] ^ $z));
}

private static function fixk($k) {
Expand Down

0 comments on commit 3906dd2

Please sign in to comment.