public class TokenSymmetricKey extends TokenKey implements javax.crypto.SecretKey
A cryptographic operation performed with this key occurs on the PKCS#11 device.
| Constructor and Description |
|---|
TokenSymmetricKey(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.
|
int |
getKeyLength()
Returns the length of this key (in bits).
|
SymmetricKeyType |
getKeyType()
Returns the type of this key.
|
assertMechanismSupported, destroyCriticalData, getEncoded, getFormat, getObjectHandle, getPKCS11LibraryConnection, getSession, getSlotID, setOwnerpublic TokenSymmetricKey(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 symmetric key on the PKCS#11 deviceslotID - the slot ID under which the session was openedpublic java.lang.String getAlgorithm()
For example, "AES" would indicate that this key is an AES key. Refer
to SymmetricKeyType for a list of supported symmetric key types
Note: Because this key is stored on a PKCS#11 device, this call extracts the algorithm name for this key from the device.
getAlgorithm in interface java.security.Keypublic SymmetricKeyType getKeyType()
Note: Because this key is stored on a PKCS#11 device, this call extracts the key type for this key from the device.
public int getKeyLength()
For example, an AES-256 key, this API would return 256.
Note: Because this key is stored on a PKCS#11 device, this call extracts the key length from the device.
getKeyLength in interface KeyWithLength