Пример #1
0
        /**
         * return a X9ECParameters object representing the passed in named
         * curve.
         *
         * @param oid the object id of the curve requested
         * @return an X9ECParameters object or null if the curve is not available.
         */
        public static X9ECParameters GetByOid(DerObjectIdentifier oid)
        {
            X9ECParameters ecP = X962NamedCurves.GetByOid(oid);

            if (ecP == null)
            {
                ecP = SecNamedCurves.GetByOid(oid);
            }

            // NOTE: All the NIST curves are currently from SEC, so no point in redundant OID lookup

            if (ecP == null)
            {
                ecP = TeleTrusTNamedCurves.GetByOid(oid);
            }
            if (ecP == null)
            {
                ecP = AnssiNamedCurves.GetByOid(oid);
            }
            if (ecP == null)
            {
                ecP = FromDomainParameters(ECGost3410NamedCurves.GetByOid(oid));
            }
            if (ecP == null)
            {
                ecP = GMNamedCurves.GetByOid(oid);
            }
            return(ecP);
        }
Пример #2
0
        public static X9ECParameters GetByOid(DerObjectIdentifier oid)
        {
            X9ECParameters byOid = X962NamedCurves.GetByOid(oid);

            if (byOid == null)
            {
                byOid = SecNamedCurves.GetByOid(oid);
            }
            if (byOid == null)
            {
                byOid = TeleTrusTNamedCurves.GetByOid(oid);
            }
            if (byOid == null)
            {
                byOid = AnssiNamedCurves.GetByOid(oid);
            }
            return(byOid);
        }