Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/jdk1.4/org/bouncycastle/util/Integers.java')
-rw-r--r--core/src/main/jdk1.4/org/bouncycastle/util/Integers.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/main/jdk1.4/org/bouncycastle/util/Integers.java b/core/src/main/jdk1.4/org/bouncycastle/util/Integers.java
index 2b9aaee0..e461a77c 100644
--- a/core/src/main/jdk1.4/org/bouncycastle/util/Integers.java
+++ b/core/src/main/jdk1.4/org/bouncycastle/util/Integers.java
@@ -2,6 +2,16 @@ package org.bouncycastle.util;
public class Integers
{
+ public static int rotateLeft(int i, int distance)
+ {
+ return (i << distance) ^ (i >>> -distance);
+ }
+
+ public static int rotateRight(int i, int distance)
+ {
+ return (i >>> distance) ^ (i << -distance);
+ }
+
public static Integer valueOf(int value)
{
return new Integer(value);