public class Mechanism extends PKCS11Object
PKCS11Object.ObjectClass, PKCS11Object.VendorDefinedObjectBuilder| Modifier and Type | Field and Description |
|---|---|
protected LongAttribute |
mechanismType
The mechanism Type of this Mechanism object.
|
attributeTable, objectClass, objectClassNames, objectHandle, vendorObjectBuilder| Modifier | Constructor and Description |
|---|---|
|
Mechanism()
The default constructor.
|
protected |
Mechanism(Session session,
long objectHandle)
Constructor taking the reference to the PKCS#11 module for accessing the
object's attributes, the session handle to use for reading the attribute
values and the object handle.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocateAttributes()
Allocates the attribute objects for this class and adds them to the
attribute table.
|
boolean |
equals(Object otherObject)
Compares all member variables of this object with the other object.
|
LongAttribute |
getMechanismType()
Returns the mechanism type of this mechanism object.
|
int |
hashCode()
The overriding of this method should ensure that the objects of this
class work correctly in a hashtable.
|
protected static void |
putAttributesInTable(Mechanism object)
Put all attributes of the given object into the attributes table of this
object.
|
void |
readAttributes(Session session)
Read the values of the attributes of this object from the token.
|
String |
toString()
Returns a string representation of the current object.
|
getAttribute, getAttributeTable, getAttributeValue, getAttributeValues, getInstance, getObjectClass, getObjectClassName, getObjectHandle, getSetAttributes, getSetAttributes, getUnknownObject, getVendorDefinedObjectBuilder, putAttribute, putAttributesInTable, removeAttribute, setObjectHandle, setVendorDefinedObjectBuilder, toStringprotected LongAttribute mechanismType
public Mechanism()
protected Mechanism(Session session, long objectHandle) throws TokenException
session - The session to use for reading attributes. This session must
have the appropriate rights; i.e. it must be a user-session, if
it is a private object.objectHandle - The object handle as given from the PKCS#111 module.TokenException - If getting the attributes failed.protected static void putAttributesInTable(Mechanism object)
object - The object to handle.protected void allocateAttributes()
allocateAttributes in class PKCS11Objectpublic boolean equals(Object otherObject)
equals in class PKCS11ObjectotherObject - The other object to compare to.public void readAttributes(Session session) throws TokenException
readAttributes in class PKCS11Objectsession - The session to use for reading attributes. This session must
have the appropriate rights; i.e. it must be a user-session, if
it is a private object.TokenException - If getting the attributes failed.public LongAttribute getMechanismType()
public String toString()
toString in class PKCS11Objectpublic int hashCode()
hashCode in class PKCS11ObjectCopyright © 2022. All rights reserved.