Package org.conscrypt
Class OpenSSLRSAPrivateKey
java.lang.Object
org.conscrypt.OpenSSLRSAPrivateKey
- All Implemented Interfaces:
Serializable,RSAKey,RSAPrivateKey,Key,PrivateKey,Destroyable,OpenSSLKeyHolder
- Direct Known Subclasses:
OpenSSLRSAPrivateCrtKey
An implementation of
PrivateKey for RSA keys which uses BoringSSL to
perform all the operations.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) OpenSSLKey(package private) BigInteger(package private) BigIntegerprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionOpenSSLRSAPrivateKey(RSAPrivateKeySpec rsaKeySpec) OpenSSLRSAPrivateKey(OpenSSLKey key, byte[][] params) -
Method Summary
Modifier and TypeMethodDescription(package private) final voidbooleanfinal Stringfinal byte[]final String(package private) static OpenSSLKeygetInstance(RSAPrivateKey rsaPrivateKey) (package private) static OpenSSLRSAPrivateKeygetInstance(OpenSSLKey key) final BigIntegerfinal BigIntegerinthashCode()private static OpenSSLKeyinit(RSAPrivateKeySpec rsaKeySpec) private voidreadObject(ObjectInputStream stream) (package private) voidreadParams(byte[][] params) toString()(package private) static OpenSSLKeywrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, PublicKey publicKey) Wraps the provided private key for use in the TLS/SSL stack only.(package private) static OpenSSLKeywrapPlatformKey(RSAPrivateKey rsaPrivateKey) private voidwriteObject(ObjectOutputStream stream) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
key
-
fetchedParams
transient boolean fetchedParams -
modulus
BigInteger modulus -
privateExponent
BigInteger privateExponent
-
-
Constructor Details
-
OpenSSLRSAPrivateKey
OpenSSLRSAPrivateKey(OpenSSLKey key) -
OpenSSLRSAPrivateKey
OpenSSLRSAPrivateKey(OpenSSLKey key, byte[][] params) -
OpenSSLRSAPrivateKey
- Throws:
InvalidKeySpecException
-
-
Method Details
-
getOpenSSLKey
- Specified by:
getOpenSSLKeyin interfaceOpenSSLKeyHolder
-
init
- Throws:
InvalidKeySpecException
-
getInstance
-
wrapPlatformKey
- Throws:
InvalidKeyException
-
wrapJCAPrivateKeyForTLSStackOnly
static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException Wraps the provided private key for use in the TLS/SSL stack only. Sign/decrypt operations using the key will be delegated to theSignature/Cipherimplementation of the provider which accepts the key.- Throws:
InvalidKeyException
-
getInstance
- Throws:
InvalidKeyException
-
ensureReadParams
final void ensureReadParams() -
readParams
void readParams(byte[][] params) -
getPrivateExponent
- Specified by:
getPrivateExponentin interfaceRSAPrivateKey
-
getModulus
- Specified by:
getModulusin interfaceRSAKey
-
getEncoded
public final byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
getFormat
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
equals
-
hashCode
public int hashCode() -
toString
-
readObject
- Throws:
IOExceptionClassNotFoundException
-
writeObject
- Throws:
IOException
-