Package org.conscrypt
Class OpenSSLRSAPrivateCrtKey
java.lang.Object
org.conscrypt.OpenSSLRSAPrivateKey
org.conscrypt.OpenSSLRSAPrivateCrtKey
- All Implemented Interfaces:
Serializable,RSAKey,RSAPrivateCrtKey,RSAPrivateKey,Key,PrivateKey,OpenSSLKeyHolder
public class OpenSSLRSAPrivateCrtKey extends OpenSSLRSAPrivateKey implements RSAPrivateCrtKey
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.conscrypt.OpenSSLRSAPrivateKey
fetchedParams, key, modulus, privateExponent -
Constructor Summary
Constructors Constructor Description OpenSSLRSAPrivateCrtKey(RSAPrivateCrtKeySpec rsaKeySpec) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)Compares this instance with the specified object and indicates if they are equal.BigIntegergetCrtCoefficient()Returns the CRT coefficient,q^-1 mod p.BigIntegergetPrimeExponentP()Returns the CRT exponent of the primetp.BigIntegergetPrimeExponentQ()Returns the CRT exponent of the primeq.BigIntegergetPrimeP()Returns the prime factorpofn.BigIntegergetPrimeQ()Returns the prime factorqofn.BigIntegergetPublicExponent()Returns the public exponente.inthashCode()Returns an integer hash code for this object.StringtoString()Returns a string containing a concise, human-readable description of this object.Methods inherited from class org.conscrypt.OpenSSLRSAPrivateKey
getAlgorithm, getEncoded, getFormat, getModulus, getOpenSSLKey, getPrivateExponentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormatMethods inherited from interface java.security.interfaces.RSAKey
getModulusMethods inherited from interface java.security.interfaces.RSAPrivateKey
getPrivateExponent
-
Constructor Details
-
OpenSSLRSAPrivateCrtKey
- Throws:
InvalidKeySpecException
-
-
Method Details
-
getPublicExponent
Description copied from interface:RSAPrivateCrtKeyReturns the public exponente.- Specified by:
getPublicExponentin interfaceRSAPrivateCrtKey- Returns:
- the public exponent
e.
-
getPrimeP
Description copied from interface:RSAPrivateCrtKeyReturns the prime factorpofn.- Specified by:
getPrimePin interfaceRSAPrivateCrtKey- Returns:
- the prime factor
pofn.
-
getPrimeQ
Description copied from interface:RSAPrivateCrtKeyReturns the prime factorqofn.- Specified by:
getPrimeQin interfaceRSAPrivateCrtKey- Returns:
- the prime factor
qofn.
-
getPrimeExponentP
Description copied from interface:RSAPrivateCrtKeyReturns the CRT exponent of the primetp.- Specified by:
getPrimeExponentPin interfaceRSAPrivateCrtKey- Returns:
- the CRT exponent of the prime
p.
-
getPrimeExponentQ
Description copied from interface:RSAPrivateCrtKeyReturns the CRT exponent of the primeq.- Specified by:
getPrimeExponentQin interfaceRSAPrivateCrtKey- Returns:
- the CRT exponent of the prime
q.
-
getCrtCoefficient
Description copied from interface:RSAPrivateCrtKeyReturns the CRT coefficient,q^-1 mod p.- Specified by:
getCrtCoefficientin interfaceRSAPrivateCrtKey- Returns:
- the CRT coefficient.
-
equals
Description copied from class:ObjectCompares this instance with the specified object and indicates if they are equal. In order to be equal,omust represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.The default implementation returns
trueonly ifthis == o. See Writing a correctequalsmethod if you intend implementing your ownequalsmethod.The general contract for the
equalsandObject.hashCode()methods is that ifequalsreturnstruefor any two objects, thenhashCode()must return the same value for these objects. This means that subclasses ofObjectusually override either both methods or neither of them.- Overrides:
equalsin classOpenSSLRSAPrivateKey- Parameters:
o- the object to compare this instance with.- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
hashCode
public final int hashCode()Description copied from class:ObjectReturns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Overrides:
hashCodein classOpenSSLRSAPrivateKey- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-
toString
Description copied from class:ObjectReturns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.- Overrides:
toStringin classOpenSSLRSAPrivateKey- Returns:
- a printable representation of this object.
-