Example usage for org.bouncycastle.jcajce.provider.asymmetric.dstu BCDSTU4145PublicKey getAlgorithm

List of usage examples for org.bouncycastle.jcajce.provider.asymmetric.dstu BCDSTU4145PublicKey getAlgorithm

Introduction

In this page you can find the example usage for org.bouncycastle.jcajce.provider.asymmetric.dstu BCDSTU4145PublicKey getAlgorithm.

Prototype

public String getAlgorithm() 

Source Link

Usage

From source file:org.ejbca.core.ejb.ca.caadmin.CAsTest.java

License:Open Source License

private void checkDSTU4145Key(PublicKey pk) {
    if (pk instanceof BCDSTU4145PublicKey) {
        BCDSTU4145PublicKey dstupk = (BCDSTU4145PublicKey) pk;
        assertEquals("DSTU4145", dstupk.getAlgorithm());
        org.bouncycastle.jce.spec.ECParameterSpec spec = dstupk.getParameters();
        assertNotNull("DSTU4145 public key spec can't be null", spec);
    } else {/*from   w  w  w .  j  a  v  a 2  s. com*/
        assertTrue("Public key is not DSTU4145: " + pk.getClass().getName(), false);
    }
}