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

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

Introduction

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

Prototype

public static ASN1ObjectIdentifier getOID(String name) 

Source Link

Document

return the object identifier signified by the passed in name.

Usage

From source file:com.github.horrorho.inflatabledonkey.crypto.rfc6637.RFC6637Factory.java

License:Open Source License

private static RFC6637 create(String curveName, Supplier<Digest> digestFactory,
        Supplier<Wrapper> wrapperFactory, int publicKeyAlgID, int symAlgID, int symAlgIDLength, int kdfHashID) {

    try {//from   ww w.  j  ava 2 s. c om
        ASN1ObjectIdentifier oid = ECNamedCurveTable.getOID(curveName);

        RFC6637KDF kdf = new RFC6637KDF(digestFactory, oid, (byte) publicKeyAlgID, (byte) symAlgID,
                (byte) kdfHashID);

        return new RFC6637(wrapperFactory, curveName, symAlgIDLength, kdf);

    } catch (IOException ex) {
        throw new IllegalStateException(ex);
    }
}