Class BCRSAPrivateCrtKey
- java.lang.Object
-
- org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey
-
- org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey
-
- All Implemented Interfaces:
java.io.Serializable
,java.security.interfaces.RSAKey
,java.security.interfaces.RSAPrivateCrtKey
,java.security.interfaces.RSAPrivateKey
,java.security.Key
,java.security.PrivateKey
,javax.security.auth.Destroyable
,PKCS12BagAttributeCarrier
public class BCRSAPrivateCrtKey extends BCRSAPrivateKey implements java.security.interfaces.RSAPrivateCrtKey
A provider representation for a RSA private key, with CRT factors included.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey
algorithmIdentifier, attrCarrier, modulus, privateExponent, rsaPrivateKey
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.math.BigInteger
getCrtCoefficient()
return the CRT coefficient.byte[]
getEncoded()
Return a PKCS8 representation of the key.java.lang.String
getFormat()
return the encoding format we produce in getEncoded().java.math.BigInteger
getPrimeExponentP()
return the prime exponent for P.java.math.BigInteger
getPrimeExponentQ()
return the prime exponent for Q.java.math.BigInteger
getPrimeP()
return the prime P.java.math.BigInteger
getPrimeQ()
return the prime Q.java.math.BigInteger
getPublicExponent()
return the public exponent.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey
getAlgorithm, getBagAttribute, getBagAttributeKeys, getModulus, getPrivateExponent, setBagAttribute
-
-
-
-
Method Detail
-
getFormat
public java.lang.String getFormat()
return the encoding format we produce in getEncoded().- Specified by:
getFormat
in interfacejava.security.Key
- Overrides:
getFormat
in classBCRSAPrivateKey
- Returns:
- the encoding format we produce in getEncoded().
-
getEncoded
public byte[] getEncoded()
Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.- Specified by:
getEncoded
in interfacejava.security.Key
- Overrides:
getEncoded
in classBCRSAPrivateKey
- Returns:
- a PKCS8 representation of the key.
-
getPublicExponent
public java.math.BigInteger getPublicExponent()
return the public exponent.- Specified by:
getPublicExponent
in interfacejava.security.interfaces.RSAPrivateCrtKey
- Returns:
- the public exponent.
-
getPrimeP
public java.math.BigInteger getPrimeP()
return the prime P.- Specified by:
getPrimeP
in interfacejava.security.interfaces.RSAPrivateCrtKey
- Returns:
- the prime P.
-
getPrimeQ
public java.math.BigInteger getPrimeQ()
return the prime Q.- Specified by:
getPrimeQ
in interfacejava.security.interfaces.RSAPrivateCrtKey
- Returns:
- the prime Q.
-
getPrimeExponentP
public java.math.BigInteger getPrimeExponentP()
return the prime exponent for P.- Specified by:
getPrimeExponentP
in interfacejava.security.interfaces.RSAPrivateCrtKey
- Returns:
- the prime exponent for P.
-
getPrimeExponentQ
public java.math.BigInteger getPrimeExponentQ()
return the prime exponent for Q.- Specified by:
getPrimeExponentQ
in interfacejava.security.interfaces.RSAPrivateCrtKey
- Returns:
- the prime exponent for Q.
-
getCrtCoefficient
public java.math.BigInteger getCrtCoefficient()
return the CRT coefficient.- Specified by:
getCrtCoefficient
in interfacejava.security.interfaces.RSAPrivateCrtKey
- Returns:
- the CRT coefficient.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBCRSAPrivateKey
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classBCRSAPrivateKey
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBCRSAPrivateKey
-
-