From 405768d3761478acaec455903ae3af4187e34525 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 29 Jul 2019 22:33:47 +0700 Subject: Add several copy64 methods --- crypto/src/math/raw/Nat.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crypto/src') 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]; -- cgit 1.5.1