Example usage for org.bouncycastle.crypto.params DSAKeyParameters isPrivate

List of usage examples for org.bouncycastle.crypto.params DSAKeyParameters isPrivate

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.params DSAKeyParameters isPrivate.

Prototype

public boolean isPrivate() 

Source Link

Usage

From source file:com.licel.jcardsim.crypto.DSAKeyImpl.java

License:Apache License

/**
 * Construct and initialize dsa key with DSAKeyParameters.
 * Use in KeyPairImpl/*from  w  w  w . j  a v  a  2  s  .co m*/
 * @see javacard.security.KeyPair
 * @see DSAKeyParameters
 * @param params key params from BouncyCastle API
 */
public DSAKeyImpl(DSAKeyParameters params) {
    this(params.isPrivate() ? KeyBuilder.TYPE_DSA_PRIVATE : KeyBuilder.TYPE_DSA_PUBLIC,
            (short) params.getParameters().getP().bitLength());
    setParameters(params);
}