TokenObject¶
- public abstract class TokenObject¶
Abstract class describes a cryptographic object located in a smart card.
Methods¶
equals¶
- public boolean equals(Object obj)¶
Compares two objects, checking if they refer to the same physical object in the card. This can be used to remove duplicates when calling
Token.getObjects
multiple times. The result is valid only if the two objects have been retrieved within the same connect session.
getCkId¶
- public String getCkId()¶
Gets identifier string, corresponding to the hexadecimal representation of the
CKA_ID
attribute of the object, as seen by the PKCS#11 interface.This value can be used to match keys and certificates that are linked together (belong in the same container).
- Returns:
the
CKA_ID
attribute of the object.
getCkLabel¶
getContainer¶
getParent¶
getPinNumber¶
- public int getPinNumber()¶
Gets index of the PIN which grants access to the object. This corresponds to the index within the
Token.getPins()
array.For public objects (certificates and public keys), it is the PIN which grants access to the corresponding private key (association is determined by the
TokenObject.getCkId()
attribute).- Returns:
the index of the pin.