summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2019-07-29 22:33:47 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2019-07-29 22:33:47 +0700
commit405768d3761478acaec455903ae3af4187e34525 (patch)
treee9564990c5007987e5312c118f5e9a4c3b39fe2e /crypto/src
parentMake main SMix array 1-dimensional (diff)
downloadBouncyCastle.NET-ed25519-405768d3761478acaec455903ae3af4187e34525.tar.xz
Add several copy64 methods
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/math/raw/Nat.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/src/math/raw/Nat.cs b/crypto/src/math/raw/Nat.cs
index 040ade74f..f9e4e6714 100644
--- a/crypto/src/math/raw/Nat.cs
+++ b/crypto/src/math/raw/Nat.cs
@@ -270,6 +270,23 @@ namespace Org.BouncyCastle.Math.Raw
             Array.Copy(x, xOff, z, zOff, len);
         }
 
+        public static ulong[] Copy64(int len, ulong[] x)
+        {
+            ulong[] z = new ulong[len];
+            Array.Copy(x, 0, z, 0, len);
+            return z;
+        }
+
+        public static void Copy64(int len, ulong[] x, ulong[] z)
+        {
+            Array.Copy(x, 0, z, 0, len);
+        }
+
+        public static void Copy64(int len, ulong[] x, int xOff, ulong[] z, int zOff)
+        {
+            Array.Copy(x, xOff, z, zOff, len);
+        }
+
         public static uint[] Create(int len)
         {
             return new uint[len];