Example usage for org.bouncycastle.asn1.x9 ECNamedCurveTable getName

List of usage examples for org.bouncycastle.asn1.x9 ECNamedCurveTable getName

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.x9 ECNamedCurveTable getName.

Prototype

public static String getName(ASN1ObjectIdentifier oid) 

Source Link

Document

return a X9ECParameters object representing the passed in named curve.

Usage

From source file:org.sufficientlysecure.keychain.securitytoken.SCP11bSecureMessaging.java

License:Open Source License

private static final ECParameterSpec getAlgorithmParameterSpec(final ECKeyFormat kf)
        throws NoSuchProviderException, NoSuchAlgorithmException, InvalidParameterSpecException {
    final AlgorithmParameters algoParams = AlgorithmParameters.getInstance(SCP11B_KEY_AGREEMENT_KEY_ALGO,
            PROVIDER);//  w  w  w .j a v  a 2  s  . co m

    algoParams.init(new ECGenParameterSpec(ECNamedCurveTable.getName(kf.getCurveOID())));

    return algoParams.getParameterSpec(ECParameterSpec.class);
}