diff options
Diffstat (limited to 'crypto/src/math/raw/Nat576.cs')
-rw-r--r-- | crypto/src/math/raw/Nat576.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/src/math/raw/Nat576.cs b/crypto/src/math/raw/Nat576.cs index 174d52bcf..3525a0f05 100644 --- a/crypto/src/math/raw/Nat576.cs +++ b/crypto/src/math/raw/Nat576.cs @@ -33,6 +33,21 @@ namespace Org.BouncyCastle.Math.Raw z[zOff + 8] = x[xOff + 8]; } +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public static void Copy64(ReadOnlySpan<ulong> x, Span<ulong> z) + { + z[0] = x[0]; + z[1] = x[1]; + z[2] = x[2]; + z[3] = x[3]; + z[4] = x[4]; + z[5] = x[5]; + z[6] = x[6]; + z[7] = x[7]; + z[8] = x[8]; + } +#endif + public static ulong[] Create64() { return new ulong[9]; @@ -71,7 +86,11 @@ namespace Org.BouncyCastle.Math.Raw return true; } +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public static bool IsZero64(ReadOnlySpan<ulong> x) +#else public static bool IsZero64(ulong[] x) +#endif { for (int i = 0; i < 9; ++i) { |