Package org.bouncycastle.jce.provider
Class JCERSAPrivateCrtKey
java.lang.Object
org.bouncycastle.jce.provider.JCERSAPrivateKey
org.bouncycastle.jce.provider.JCERSAPrivateCrtKey
- 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.jce.provider.JCERSAPrivateKey
modulus, privateExponent -
Method Summary
Modifier and TypeMethodDescriptionbooleanreturn 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.inthashCode()toString()Methods inherited from class org.bouncycastle.jce.provider.JCERSAPrivateKey
getAlgorithm, getBagAttribute, getBagAttributeKeys, getModulus, getPrivateExponent, hasFriendlyName, setBagAttribute, setFriendlyNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyedMethods inherited from interface java.security.Key
getAlgorithmMethods inherited from interface java.security.interfaces.RSAKey
getModulus, getParamsMethods inherited from interface java.security.interfaces.RSAPrivateKey
getPrivateExponent
-
Method Details
-
getFormat
return the encoding format we produce in getEncoded().- Specified by:
getFormatin interfaceKey- Overrides:
getFormatin classJCERSAPrivateKey- 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:
getEncodedin interfaceKey- Overrides:
getEncodedin classJCERSAPrivateKey- Returns:
- a PKCS8 representation of the key.
-
getPublicExponent
return the public exponent.- Specified by:
getPublicExponentin interfaceRSAPrivateCrtKey- Returns:
- the public exponent.
-
getPrimeP
return the prime P.- Specified by:
getPrimePin interfaceRSAPrivateCrtKey- Returns:
- the prime P.
-
getPrimeQ
return the prime Q.- Specified by:
getPrimeQin interfaceRSAPrivateCrtKey- Returns:
- the prime Q.
-
getPrimeExponentP
return the prime exponent for P.- Specified by:
getPrimeExponentPin interfaceRSAPrivateCrtKey- Returns:
- the prime exponent for P.
-
getPrimeExponentQ
return the prime exponent for Q.- Specified by:
getPrimeExponentQin interfaceRSAPrivateCrtKey- Returns:
- the prime exponent for Q.
-
getCrtCoefficient
return the CRT coefficient.- Specified by:
getCrtCoefficientin interfaceRSAPrivateCrtKey- Returns:
- the CRT coefficient.
-
hashCode
public int hashCode()- Overrides:
hashCodein classJCERSAPrivateKey
-
equals
- Overrides:
equalsin classJCERSAPrivateKey
-
toString
-