summary refs log tree commit diff
path: root/crypto/src/util
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-03-26 14:01:31 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-03-26 14:01:31 +0700
commit37ebe56013377b5d5aaa2bf8b15ca9d8ea68d3ed (patch)
tree955a80d556306fe0deb98d8ccaa5f82084015221 /crypto/src/util
parentMerge branch 'mpsinfo-duplicatedigest' (diff)
downloadBouncyCastle.NET-ed25519-37ebe56013377b5d5aaa2bf8b15ca9d8ea68d3ed.tar.xz
F2mCurve cleanup
Diffstat (limited to 'crypto/src/util')
-rw-r--r--crypto/src/util/Arrays.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/src/util/Arrays.cs b/crypto/src/util/Arrays.cs
index abea234a7..1f9711555 100644
--- a/crypto/src/util/Arrays.cs
+++ b/crypto/src/util/Arrays.cs
@@ -655,5 +655,21 @@ namespace Org.BouncyCastle.Utilities
 
             return result;
         }
+
+        public static int[] Reverse(int[] a)
+        {
+            if (a == null)
+                return null;
+
+            int p1 = 0, p2 = a.Length;
+            int[] result = new int[p2];
+
+            while (--p2 >= 0)
+            {
+                result[p2] = a[p1++];
+            }
+
+            return result;
+        }
     }
 }