public final class TokenDSAPrivateKey extends TokenPrivateKey implements java.security.interfaces.DSAPrivateKey
A cryptographic operation performed with this key occurs on the PKCS#11 device.
| Constructor and Description |
|---|
TokenDSAPrivateKey(PKCS11LibraryConnection pkcs11LC,
long session,
long objectHandle,
long slotID)
The constructor; creates a new
TokenDSAPrivateKey instance. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithm()
Returns the standard algorithm name for this key, which is "DSA".
|
int |
getKeyLength()
Return the length of the key in bits.
|
java.security.interfaces.DSAParams |
getParams()
Returns the DSA-specific key parameters.
|
java.math.BigInteger |
getX()
Not supported.
|
delete, getTypeassertMechanismSupported, destroyCriticalData, getEncoded, getFormat, getObjectHandle, getPKCS11LibraryConnection, getSession, getSlotID, setOwnerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroyCriticalDatapublic TokenDSAPrivateKey(PKCS11LibraryConnection pkcs11LC, long session, long objectHandle, long slotID)
TokenDSAPrivateKey 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.security.interfaces.DSAParams getParams()
Note: Because this key is stored on a PKCS#11 device, this call extracts the DSA parameters from the device.
getParams in interface java.security.interfaces.DSAKeypublic int getKeyLength()
For example, for a DSA-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 getX()
throws java.lang.RuntimeException
getX in interface java.security.interfaces.DSAPrivateKeyjava.lang.RuntimeException - always thrown indicating that this API is not supported