Example usage for java.security.interfaces RSAPrivateCrtKey getPrimeExponentP

List of usage examples for java.security.interfaces RSAPrivateCrtKey getPrimeExponentP

Introduction

In this page you can find the example usage for java.security.interfaces RSAPrivateCrtKey getPrimeExponentP.

Prototype

public BigInteger getPrimeExponentP();

Source Link

Document

Returns the primeExponentP.

Usage

From source file:org.ebayopensource.fido.uaf.crypto.KeyCodec.java

static public RSAKeyParameters generatePrivateKeyParameter(RSAPrivateKey key) {
    if (key instanceof RSAPrivateCrtKey) {
        RSAPrivateCrtKey k = (RSAPrivateCrtKey) key;
        return new RSAPrivateCrtKeyParameters(k.getModulus(), k.getPublicExponent(), k.getPrivateExponent(),
                k.getPrimeP(), k.getPrimeQ(), k.getPrimeExponentP(), k.getPrimeExponentQ(),
                k.getCrtCoefficient());/* w w  w  . j  a  va2 s .c  om*/
    } else {
        RSAPrivateKey k = key;
        return new RSAKeyParameters(true, k.getModulus(), k.getPrivateExponent());
    }
}