summary refs log tree commit diff
path: root/crypto/test/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-07 23:27:37 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-07 23:27:37 +0700
commit15105e796c6cd0c23357aa54ac5a0a05af20c2a0 (patch)
tree435794f619138df8aa7358afb3b9af4fc4c2e372 /crypto/test/src
parentSpan usage in encoders (diff)
downloadBouncyCastle.NET-ed25519-15105e796c6cd0c23357aa54ac5a0a05af20c2a0.tar.xz
More span variants in randomness classes
Diffstat (limited to 'crypto/test/src')
-rw-r--r--crypto/test/src/security/test/SecureRandomTest.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/test/src/security/test/SecureRandomTest.cs b/crypto/test/src/security/test/SecureRandomTest.cs
index fb18f98e0..11ebeb276 100644
--- a/crypto/test/src/security/test/SecureRandomTest.cs
+++ b/crypto/test/src/security/test/SecureRandomTest.cs
@@ -231,7 +231,9 @@ namespace Org.BouncyCastle.Security.Tests
 #if NET6_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER
         private static double MeasureChiSquaredSpan(SecureRandom random, int rounds)
         {
-            byte[] opts = random.GenerateSeed(2);
+            Span<byte> opts = stackalloc byte[2];
+            random.GenerateSeed(opts);
+
             Span<int> counts = stackalloc int[256];
 
             Span<byte> bs = stackalloc byte[256];
@@ -295,6 +297,12 @@ namespace Org.BouncyCastle.Security.Tests
             {
             }
 
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+            public void AddSeedMaterial(ReadOnlySpan<byte> inSeed)
+            {
+            }
+#endif
+
             public virtual void AddSeedMaterial(long seed)
             {
             }