diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-03-26 14:01:31 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-03-26 14:01:31 +0700 |
commit | 37ebe56013377b5d5aaa2bf8b15ca9d8ea68d3ed (patch) | |
tree | 955a80d556306fe0deb98d8ccaa5f82084015221 /crypto/src/util | |
parent | Merge branch 'mpsinfo-duplicatedigest' (diff) | |
download | BouncyCastle.NET-ed25519-37ebe56013377b5d5aaa2bf8b15ca9d8ea68d3ed.tar.xz |
F2mCurve cleanup
Diffstat (limited to 'crypto/src/util')
-rw-r--r-- | crypto/src/util/Arrays.cs | 16 |
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; + } } } |