<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Security.GeneratorUtilities

public static class GeneratorUtilities
Factory for symmetric key generators ( CipherKeyGenerator) and asymmetric key pair generators ( IAsymmetricCipherKeyPairGenerator), resolved by algorithm name or ASN.1 OID.

Resolve a CipherKeyGenerator for the given symmetric algorithm OID.

public static CipherKeyGenerator GetKeyGenerator(string algorithm)

Resolve a CipherKeyGenerator for the named symmetric algorithm (e.g. "AES", "DESede", "ChaCha20"), pre-configured with the algorithm's default key size.

Resolve an IAsymmetricCipherKeyPairGenerator for the given algorithm OID.

Resolve an IAsymmetricCipherKeyPairGenerator for the named asymmetric algorithm (e.g. "RSA", "ECDSA", "Ed25519", "DH").