diff options
Diffstat (limited to 'crypto/src/asn1/anssi/ANSSINamedCurves.cs')
-rw-r--r-- | crypto/src/asn1/anssi/ANSSINamedCurves.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/asn1/anssi/ANSSINamedCurves.cs b/crypto/src/asn1/anssi/ANSSINamedCurves.cs index ed1faa75c..2e164989a 100644 --- a/crypto/src/asn1/anssi/ANSSINamedCurves.cs +++ b/crypto/src/asn1/anssi/ANSSINamedCurves.cs @@ -116,21 +116,21 @@ namespace Org.BouncyCastle.Asn1.Anssi /// <param name="oid">The <see cref="DerObjectIdentifier">OID</see> for the curve.</param> public static X9ECParametersHolder GetByOidLazy(DerObjectIdentifier oid) { - return curves.TryGetValue(oid, out var holder) ? holder : null; + return CollectionUtilities.GetValueOrNull(curves, oid); } /// <summary>Look up the name of the curve with the given <see cref="DerObjectIdentifier">OID</see>.</summary> /// <param name="oid">The <see cref="DerObjectIdentifier">OID</see> for the curve.</param> public static string GetName(DerObjectIdentifier oid) { - return names.TryGetValue(oid, out var name) ? name : null; + return CollectionUtilities.GetValueOrNull(names, oid); } /// <summary>Look up the <see cref="DerObjectIdentifier">OID</see> of the curve with the given name.</summary> /// <param name="name">The name of the curve.</param> public static DerObjectIdentifier GetOid(string name) { - return objIds.TryGetValue(name, out var oid) ? oid : null; + return CollectionUtilities.GetValueOrNull(objIds, name); } /// <summary>Enumerate the available curve names in this registry.</summary> |