public final class TokenRSAPrivateKey extends TokenPrivateKey implements java.security.interfaces.RSAPrivateKey
A cryptographic operation performed with this key occurs on the PKCS#11 device.
| Constructor and Description |
|---|
TokenRSAPrivateKey(PKCS11LibraryConnection pkcs11LC,
long session,
long objectHandle,
long slotID)
The constructor; creates a new
TokenRSAPrivateKey instance. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithm()
Returns the standard algorithm name for this key, which is "RSA".
|
int |
getKeyLength()
Return the length of the key in bits.
|
java.math.BigInteger |
getModulus()
Returns the modulus.
|
java.math.BigInteger |
getPrivateExponent()
Not supported.
|
delete, getTypeassertMechanismSupported, destroyCriticalData, getEncoded, getFormat, getObjectHandle, getPKCS11LibraryConnection, getSession, getSlotID, setOwnerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroyCriticalDatapublic TokenRSAPrivateKey(PKCS11LibraryConnection pkcs11LC, long session, long objectHandle, long slotID)
TokenRSAPrivateKey instance.pkcs11LC - the connection to the PKCS#11 librarysession - the "read only" sessionobjectHandle - the handle to the private key on the PKCS#11 deviceslotID - the slot ID under which the session was openedpublic java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic java.math.BigInteger getModulus()
Note: Because this key is stored on a PKCS#11 device, this call extracts the modulus value from the device.
getModulus in interface java.security.interfaces.RSAKeypublic int getKeyLength()
For example, an RSA-1024 key, this API would return 1024.
Note: Because this key is stored on a PKCS#11 device, this call extracts the key length from the device.
getKeyLength in interface KeyWithLengthpublic java.math.BigInteger getPrivateExponent()
getPrivateExponent in interface java.security.interfaces.RSAPrivateKeyjava.lang.RuntimeException - always thrown indicating that this API is not supported