Class BCRSAPrivateCrtKey
java.lang.Object
org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey
org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey
- All Implemented Interfaces:
Serializable
,RSAKey
,RSAPrivateCrtKey
,RSAPrivateKey
,Key
,PrivateKey
,Destroyable
,PKCS12BagAttributeCarrier
A provider representation for a RSA private key, with CRT factors included.
- See Also:
-
Field Summary
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey
algorithmIdentifier, attrCarrier, modulus, privateExponent, rsaPrivateKey
-
Method Summary
Modifier and TypeMethodDescriptionboolean
return the CRT coefficient.byte[]
Return a PKCS8 representation of the key.return the encoding format we produce in getEncoded().return the prime exponent for P.return the prime exponent for Q.return the prime P.return the prime Q.return the public exponent.int
hashCode()
toString()
Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateKey
getAlgorithm, getBagAttribute, getBagAttributeKeys, getModulus, getPrivateExponent, setBagAttribute
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
Methods inherited from interface java.security.Key
getAlgorithm
Methods inherited from interface java.security.interfaces.RSAKey
getModulus, getParams
Methods inherited from interface java.security.interfaces.RSAPrivateKey
getPrivateExponent
-
Method Details
-
getFormat
return the encoding format we produce in getEncoded().- Specified by:
getFormat
in interfaceKey
- 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 interfaceKey
- Overrides:
getEncoded
in classBCRSAPrivateKey
- Returns:
- a PKCS8 representation of the key.
-
getPublicExponent
return the public exponent.- Specified by:
getPublicExponent
in interfaceRSAPrivateCrtKey
- Returns:
- the public exponent.
-
getPrimeP
return the prime P.- Specified by:
getPrimeP
in interfaceRSAPrivateCrtKey
- Returns:
- the prime P.
-
getPrimeQ
return the prime Q.- Specified by:
getPrimeQ
in interfaceRSAPrivateCrtKey
- Returns:
- the prime Q.
-
getPrimeExponentP
return the prime exponent for P.- Specified by:
getPrimeExponentP
in interfaceRSAPrivateCrtKey
- Returns:
- the prime exponent for P.
-
getPrimeExponentQ
return the prime exponent for Q.- Specified by:
getPrimeExponentQ
in interfaceRSAPrivateCrtKey
- Returns:
- the prime exponent for Q.
-
getCrtCoefficient
return the CRT coefficient.- Specified by:
getCrtCoefficient
in interfaceRSAPrivateCrtKey
- Returns:
- the CRT coefficient.
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBCRSAPrivateKey
-
equals
- Overrides:
equals
in classBCRSAPrivateKey
-
toString
- Overrides:
toString
in classBCRSAPrivateKey
-