diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-07-29 22:33:47 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-07-29 22:33:47 +0700 |
commit | 405768d3761478acaec455903ae3af4187e34525 (patch) | |
tree | e9564990c5007987e5312c118f5e9a4c3b39fe2e /crypto | |
parent | Make main SMix array 1-dimensional (diff) | |
download | BouncyCastle.NET-ed25519-405768d3761478acaec455903ae3af4187e34525.tar.xz |
Add several copy64 methods
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/math/raw/Nat.cs | 17 |
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]; |