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/j2me/org/spongycastle/util/Integers.java')
-rw-r--r--core/src/main/j2me/org/spongycastle/util/Integers.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/src/main/j2me/org/spongycastle/util/Integers.java b/core/src/main/j2me/org/spongycastle/util/Integers.java
new file mode 100644
index 00000000..bf6b5e34
--- /dev/null
+++ b/core/src/main/j2me/org/spongycastle/util/Integers.java
@@ -0,0 +1,19 @@
+package org.spongycastle.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);
+ }
+}