File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
j2me/org/bouncycastle/util
jdk1.4/org/bouncycastle/util Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ public static int reverseBytes(int i)
6565
6666 public static int rotateLeft (int i , int distance )
6767 {
68- return (i << distance ) ^ (i >>> -distance );
68+ return (i << distance ) | (i >>> -distance );
6969 }
7070
7171 public static int rotateRight (int i , int distance )
7272 {
73- return (i >>> distance ) ^ (i << -distance );
73+ return (i >>> distance ) | (i << -distance );
7474 }
7575
7676 public static Integer valueOf (int value )
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ public static long reverseBytes(long i)
6565
6666 public static long rotateLeft (long i , int distance )
6767 {
68- return (i << distance ) ^ (i >>> -distance );
68+ return (i << distance ) | (i >>> -distance );
6969 }
7070
7171 public static long rotateRight (long i , int distance )
7272 {
73- return (i >>> distance ) ^ (i << -distance );
73+ return (i >>> distance ) | (i << -distance );
7474 }
7575
7676 public static Long valueOf (long value )
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ public static int reverseBytes(int i)
6565
6666 public static int rotateLeft (int i , int distance )
6767 {
68- return (i << distance ) ^ (i >>> -distance );
68+ return (i << distance ) | (i >>> -distance );
6969 }
7070
7171 public static int rotateRight (int i , int distance )
7272 {
73- return (i >>> distance ) ^ (i << -distance );
73+ return (i >>> distance ) | (i << -distance );
7474 }
7575
7676 public static Integer valueOf (int value )
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ public static long reverseBytes(long i)
6565
6666 public static long rotateLeft (long i , int distance )
6767 {
68- return (i << distance ) ^ (i >>> -distance );
68+ return (i << distance ) | (i >>> -distance );
6969 }
7070
7171 public static long rotateRight (long i , int distance )
7272 {
73- return (i >>> distance ) ^ (i << -distance );
73+ return (i >>> distance ) | (i << -distance );
7474 }
7575
7676 public static Long valueOf (long value )
You can’t perform that action at this time.
0 commit comments