ECUtil (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.jcajce.provider.asymmetric.util

## Class ECUtil

- java.lang.Object
- - org.bouncycastle.jcajce.provider.asymmetric.util.ECUtil

-     public class ECUtil
      extends java.lang.Object

  utility class for converting jce/jca ECDSA, ECDH, and ECDHC objects into their org.bouncycastle.crypto counterparts.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ECUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AsymmetricKeyParameter` | `generatePrivateKeyParameter(java.security.PrivateKey key)`
    `static AsymmetricKeyParameter` | `generatePublicKeyParameter(java.security.PublicKey key)`
    `static java.lang.String` | `getCurveName(ASN1ObjectIdentifier oid)`
    `static X9ECParameters` | `getNamedCurveByName(java.lang.String curveName)`
    `static X9ECParameters` | `getNamedCurveByOid(ASN1ObjectIdentifier oid)`
    `static ASN1ObjectIdentifier` | `getNamedCurveOid(ECParameterSpec ecParameterSpec)`
    `static ASN1ObjectIdentifier` | `getNamedCurveOid(java.lang.String curveName)`
    `static int` | `getOrderBitLength(java.math.BigInteger order, java.math.BigInteger privateValue)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ECUtil

          public ECUtil()

  - ### Method Detail

    - #### generatePublicKeyParameter

          public static AsymmetricKeyParameter generatePublicKeyParameter(java.security.PublicKey key)
                                                                   throws java.security.InvalidKeyException

      Throws:
        `java.security.InvalidKeyException`

    - #### generatePrivateKeyParameter

          public static AsymmetricKeyParameter generatePrivateKeyParameter(java.security.PrivateKey key)
                                                                    throws java.security.InvalidKeyException

      Throws:
        `java.security.InvalidKeyException`

    - #### getOrderBitLength

          public static int getOrderBitLength(java.math.BigInteger order,
                              java.math.BigInteger privateValue)

    - #### getNamedCurveOid

          public static ASN1ObjectIdentifier getNamedCurveOid(java.lang.String curveName)

    - #### getNamedCurveOid

          public static ASN1ObjectIdentifier getNamedCurveOid(ECParameterSpec ecParameterSpec)

    - #### getNamedCurveByOid

          public static X9ECParameters getNamedCurveByOid(ASN1ObjectIdentifier oid)

    - #### getNamedCurveByName

          public static X9ECParameters getNamedCurveByName(java.lang.String curveName)

    - #### getCurveName

          public static java.lang.String getCurveName(ASN1ObjectIdentifier oid)