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

KeyGenerationParameters

using Org.BouncyCastle.Security; using System; namespace Org.BouncyCastle.Crypto { public class KeyGenerationParameters { private readonly SecureRandom m_random; private readonly int m_strength; public SecureRandom Random => m_random; public int Strength => m_strength; public KeyGenerationParameters(SecureRandom random, int strength) { if (strength < 0) throw new ArgumentException("cannot be negative", "strength"); if (random == null) throw new ArgumentNullException("random"); m_random = random; m_strength = strength; } } }