<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.0" />

IRandomGenerator

public interface IRandomGenerator
using System; namespace Org.BouncyCastle.Crypto.Prng { public interface IRandomGenerator { void AddSeedMaterial(byte[] seed); void AddSeedMaterial(ReadOnlySpan<byte> seed); void AddSeedMaterial(long seed); void NextBytes(byte[] bytes); void NextBytes(byte[] bytes, int start, int len); void NextBytes(Span<byte> bytes); } }