diff options
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/crypto/prng/test/TestEntropySourceProvider.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/test/src/crypto/prng/test/TestEntropySourceProvider.cs b/crypto/test/src/crypto/prng/test/TestEntropySourceProvider.cs index 647799630..9ebbb7ccd 100644 --- a/crypto/test/src/crypto/prng/test/TestEntropySourceProvider.cs +++ b/crypto/test/src/crypto/prng/test/TestEntropySourceProvider.cs @@ -48,6 +48,18 @@ namespace Org.BouncyCastle.Crypto.Prng.Test return rv; } + // NOTE: .NET Core 2.1 has Span<T>, but is tested against our .NET Standard 2.0 assembly. +//#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER +#if NET6_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER + int IEntropySource.GetEntropy(Span<byte> output) + { + int length = bitsRequired / 8; + data.AsSpan(index, length).CopyTo(output); + index += length; + return length; + } +#endif + public int EntropySize { get { return bitsRequired; } |