Esempio n. 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);
            }

            return(ecP);
        }
Esempio n. 2
0
 public X962Parameters(
     X9ECParameters ecParameters)
 {
     this._params = ecParameters.ToAsn1Object();
 }