summary refs log tree commit diff
path: root/crypto/src/pqc/math/linearalgebra/Utils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pqc/math/linearalgebra/Utils.cs')
-rw-r--r--crypto/src/pqc/math/linearalgebra/Utils.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/src/pqc/math/linearalgebra/Utils.cs b/crypto/src/pqc/math/linearalgebra/Utils.cs
new file mode 100644
index 000000000..eb2760f82
--- /dev/null
+++ b/crypto/src/pqc/math/linearalgebra/Utils.cs
@@ -0,0 +1,20 @@
+
+namespace Org.BouncyCastle.Pqc.Math.LinearAlgebra
+{
+    class Utils
+    {
+        internal static int UnsignedRightBitShiftInt(int a, int b)
+        {
+            uint tmp = (uint) a;
+            tmp >>= b;
+            return (int) tmp;
+        }
+
+        internal static long UnsignedRightBitShiftLong(long a, int b)
+        {
+            ulong tmp = (ulong)a;
+            tmp >>= b;
+            return (long) tmp;
+        }
+    }
+}