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

MLKemParameters

public sealed class MLKemParameters
using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Nist; using Org.BouncyCastle.Utilities.Collections; using System; using System.Collections.Generic; namespace Org.BouncyCastle.Crypto.Parameters { public sealed class MLKemParameters { public static readonly MLKemParameters ml_kem_512 = new MLKemParameters("ML-KEM-512", MLKemParameterSet.ml_kem_512, NistObjectIdentifiers.id_alg_ml_kem_512); public static readonly MLKemParameters ml_kem_768 = new MLKemParameters("ML-KEM-768", MLKemParameterSet.ml_kem_768, NistObjectIdentifiers.id_alg_ml_kem_768); public static readonly MLKemParameters ml_kem_1024 = new MLKemParameters("ML-KEM-1024", MLKemParameterSet.ml_kem_1024, NistObjectIdentifiers.id_alg_ml_kem_1024); internal static readonly IDictionary<string, MLKemParameters> ByName = CollectionUtilities.ReadOnly(new Dictionary<string, MLKemParameters> { { ml_kem_512.Name, ml_kem_512 }, { ml_kem_768.Name, ml_kem_768 }, { ml_kem_1024.Name, ml_kem_1024 } }); internal static readonly IDictionary<DerObjectIdentifier, MLKemParameters> ByOid = CollectionUtilities.ReadOnly(new Dictionary<DerObjectIdentifier, MLKemParameters> { { ml_kem_512.Oid, ml_kem_512 }, { ml_kem_768.Oid, ml_kem_768 }, { ml_kem_1024.Oid, ml_kem_1024 } }); private readonly string m_name; private readonly MLKemParameterSet m_parameterSet; private readonly DerObjectIdentifier m_oid; public string Name => m_name; internal DerObjectIdentifier Oid => m_oid; public MLKemParameterSet ParameterSet => m_parameterSet; private MLKemParameters(string name, MLKemParameterSet parameterSet, DerObjectIdentifier oid) { if (name == null) throw new ArgumentNullException("name"); m_name = name; if (parameterSet == null) throw new ArgumentNullException("parameterSet"); m_parameterSet = parameterSet; if (oid == null) throw new ArgumentNullException("oid"); m_oid = oid; } public override string ToString() { return Name; } } }