Module ibm.crypto.ibmjcehybrid
Class HybridRACFPrivateKey
- java.lang.Object
-
- com.ibm.crypto.ibmjcehybrid.provider.HybridRACFPrivateKey
-
- 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
public class HybridRACFPrivateKey extends java.lang.Object implements java.security.interfaces.RSAPrivateCrtKey, java.io.Serializable
This class represents an RSA key object that was retrieved from RACF and potentially contains both the Software JCE and IBMJCECCA representations of the key from RACF.This key is intended to be used only by various algorithms within the IBMJCEHYBRID provider.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HybridRACFPrivateKey(java.security.PrivateKey IBMJCECCAPrivateKey, java.security.PrivateKey softwareJCEPrivateKey)
Constructor of this key type.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getAlgorithm()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getCrtCoefficient()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.byte[]
getEncoded()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.lang.String
getFormat()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.security.PrivateKey
getIBMJCECCAPrivateKey()
Method to get the value of the IBMJCECCA representation of this key.java.security.PrivateKey
getIBMJCEPrivateKey()
Deprecated.UsegetSoftwareJCEPrivateKey()
instead Exists for backwards compatibility since IBMJCE is not on Java 11.java.math.BigInteger
getModulus()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getPrimeExponentP()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getPrimeExponentQ()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getPrimeP()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getPrimeQ()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getPrivateExponent()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.math.BigInteger
getPublicExponent()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.java.security.PrivateKey
getSoftwareJCEPrivateKey()
Method to get the value of the Software JCE representation of this key.void
setIBMJCECCAPrivateKey(java.security.PrivateKey IBMJCECCAPrivateKey)
Method to set the value of the IBMJCECCA representation of this key.void
setIBMJCEPrivateKey(java.security.PrivateKey IBMJCEPrivateKey)
Deprecated.UsesetSoftwareJCEPrivateKey(PrivateKey)
instead Exists for backwards compatibility since IBMJCE is not on Java 11.void
setSoftwareJCEPrivateKey(java.security.PrivateKey softwareJCEPrivateKey)
Method to set the value of the Software JCE representation of this key.java.lang.String
toString()
Returns a string representation of the key in human readable format.
-
-
-
Constructor Detail
-
HybridRACFPrivateKey
public HybridRACFPrivateKey(java.security.PrivateKey IBMJCECCAPrivateKey, java.security.PrivateKey softwareJCEPrivateKey)
Constructor of this key type. Constructs a HybridRACFPrivateKey key given the IBMJCECCA and Software JCE representations of the key.- Parameters:
IBMJCECCAPrivateKey
- the IBMJCECCA private key representation of this key.softwareJCEPrivateKey
- the Software JCE private key representation of this key.
-
-
Method Detail
-
getPublicExponent
public java.math.BigInteger getPublicExponent()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getPublicExponent
in interfacejava.security.interfaces.RSAPrivateCrtKey
-
getPrimeExponentQ
public java.math.BigInteger getPrimeExponentQ()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getPrimeExponentQ
in interfacejava.security.interfaces.RSAPrivateCrtKey
-
getPrimeExponentP
public java.math.BigInteger getPrimeExponentP()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getPrimeExponentP
in interfacejava.security.interfaces.RSAPrivateCrtKey
-
getPrimeQ
public java.math.BigInteger getPrimeQ()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getPrimeQ
in interfacejava.security.interfaces.RSAPrivateCrtKey
-
getPrimeP
public java.math.BigInteger getPrimeP()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getPrimeP
in interfacejava.security.interfaces.RSAPrivateCrtKey
-
getCrtCoefficient
public java.math.BigInteger getCrtCoefficient()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getCrtCoefficient
in interfacejava.security.interfaces.RSAPrivateCrtKey
-
getPrivateExponent
public java.math.BigInteger getPrivateExponent()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getPrivateExponent
in interfacejava.security.interfaces.RSAPrivateKey
-
getModulus
public java.math.BigInteger getModulus() throws java.lang.UnsupportedOperationException
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getModulus
in interfacejava.security.interfaces.RSAKey
- Throws:
java.lang.UnsupportedOperationException
-
getEncoded
public byte[] getEncoded()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getEncoded
in interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getFormat
in interfacejava.security.Key
-
getAlgorithm
public java.lang.String getAlgorithm()
This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.- Specified by:
getAlgorithm
in interfacejava.security.Key
-
setIBMJCEPrivateKey
@Deprecated public void setIBMJCEPrivateKey(java.security.PrivateKey IBMJCEPrivateKey) throws java.security.InvalidParameterException
Deprecated.UsesetSoftwareJCEPrivateKey(PrivateKey)
instead Exists for backwards compatibility since IBMJCE is not on Java 11.Method to set the value of the Software JCE representation of this key.- Parameters:
softwareJCEPrivateKey
- the Software JCE private key representation. This key must be either null or an instance of the ECPrivateKey or RSAPrivateKey class.- Throws:
java.security.InvalidParameterException
-
setSoftwareJCEPrivateKey
public void setSoftwareJCEPrivateKey(java.security.PrivateKey softwareJCEPrivateKey) throws java.security.InvalidParameterException
Method to set the value of the Software JCE representation of this key.- Parameters:
softwareJCEPrivateKey
- the Software JCE private key representation. This key must be either null or an instance of the ECPrivateKey or RSAPrivateKey class.- Throws:
java.security.InvalidParameterException
-
getIBMJCEPrivateKey
@Deprecated public java.security.PrivateKey getIBMJCEPrivateKey()
Deprecated.UsegetSoftwareJCEPrivateKey()
instead Exists for backwards compatibility since IBMJCE is not on Java 11.Method to get the value of the Software JCE representation of this key.- Returns:
- PrivateKey which represents the Software JCE portion of this key.
-
getSoftwareJCEPrivateKey
public java.security.PrivateKey getSoftwareJCEPrivateKey()
Method to get the value of the Software JCE representation of this key.- Returns:
- PrivateKey which represents the Software JCE portion of this key.
-
setIBMJCECCAPrivateKey
public void setIBMJCECCAPrivateKey(java.security.PrivateKey IBMJCECCAPrivateKey) throws java.security.InvalidParameterException
Method to set the value of the IBMJCECCA representation of this key.- Parameters:
IBMJCECCAPrivateKey
- the IBMJCECCA private key representation. This key must be either null or an instance of the com.ibm.crypto.hdwrCCA.provider.ECPrivateHWKey or com.ibm.crypto.hdwrCCA.provider.RSAPrivateHWKey class.- Throws:
java.security.InvalidParameterException
-
getIBMJCECCAPrivateKey
public java.security.PrivateKey getIBMJCECCAPrivateKey()
Method to get the value of the IBMJCECCA representation of this key.- Returns:
- PrivateKey which represents the IBMJCECCA portion of this key.
-
toString
public java.lang.String toString()
Returns a string representation of the key in human readable format.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string that represents the key.
-
-