IAIK PKCS#11 Wrapper
version 1.5

iaik.pkcs.pkcs11.objects
Class MechanismArrayAttribute

java.lang.Object
  |
  +--iaik.pkcs.pkcs11.objects.Attribute
        |
        +--iaik.pkcs.pkcs11.objects.MechanismArrayAttribute
All Implemented Interfaces:
java.lang.Cloneable

public class MechanismArrayAttribute
extends Attribute

Objects of this class represent a mechanism array attribute of a PKCS#11 object as specified by PKCS#11. This attribute is available since cryptoki version 2.20.


Fields inherited from class iaik.pkcs.pkcs11.objects.Attribute
AC_ISSUER, ALLOWED_MECHANISMS, ALWAYS_AUTHENTICATE, ALWAYS_SENSITIVE, APPLICATION, ATTR_TYPES, attributeClasses_, attributeNames_, AUTH_PIN_FLAGS, BASE, BITS_PER_PIXEL, CERTIFICATE_CATEGORY, CERTIFICATE_TYPE, CHAR_COLUMNS, CHAR_ROWS, CHAR_SETS, CHECK_VALUE, ckAttribute_, CLASS, COEFFICIENT, COLOR, DECRYPT, DERIVE, EC_PARAMS, EC_POINT, ECDSA_PARAMS, ENCODING_METHODS, ENCRYPT, END_DATE, EXPONENT_1, EXPONENT_2, EXTRACTABLE, HAS_RESET, HASH_OF_ISSUER_PUBLIC_KEY, HASH_OF_SUBJECT_PUBLIC_KEY, HW_FEATURE_TYPE, ID, ISSUER, JAVA_MIDP_SECURITY_DOMAIN, KEY_GEN_MECHANISM, KEY_TYPE, LABEL, LOCAL, MECHANISM_TYPE, MIME_TYPES, MODIFIABLE, MODULUS, MODULUS_BITS, NEVER_EXTRACTABLE, OBJECT_ID, OWNER, PIXEL_X, PIXEL_Y, present_, PRIME, PRIME_1, PRIME_2, PRIME_BITS, PRIVATE, PRIVATE_EXPONENT, PUBLIC_EXPONENT, RESET_ON_INIT, RESOLUTION, SECONDARY_AUTH, SENSITIVE, sensitive_, SERIAL_NUMBER, SIGN, SIGN_RECOVER, START_DATE, stateKnown_, SUB_PRIME_BITS, SUBJECT, SUBPRIME, TOKEN, TRUSTED, UNWRAP, UNWRAP_TEMPLATE, URL, VALUE, VALUE_BITS, VALUE_LEN, VENDOR_DEFINED, VERIFY, VERIFY_RECOVER, WRAP, WRAP_TEMPLATE, WRAP_WITH_TRUSTED
 
Constructor Summary
MechanismArrayAttribute(java.lang.Long type)
          Constructor taking the PKCS#11 type of the attribute.
 
Method Summary
 java.lang.Object clone()
          Create a (deep) clone of this object.
protected  boolean equalsValue(java.lang.Object otherObject)
          True, if both attribute values are null or if both attribute values are equal.
 Mechanism[] getMechanismAttributeArrayValue()
          Get the mechanism attribute array value of this attribute as Mechanism[].
protected  java.lang.String getValueString()
          Get a string representation of the value of this attribute.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setMechanismAttributeArrayValue(Mechanism[] value)
          Set the attributes of this mechanism attribute array by specifying a Mechanism[].
 void setValue(java.lang.Object value)
          Redirects the request for setting the attribute value to the implementing attribute class.
 
Methods inherited from class iaik.pkcs.pkcs11.objects.Attribute
equals, getAttributeClass, getAttributeName, getCkAttribute, getType, isPresent, isSensitive, isStateKnown, setCkAttribute, setPresent, setSensitive, setType, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MechanismArrayAttribute

public MechanismArrayAttribute(java.lang.Long type)
Constructor taking the PKCS#11 type of the attribute.
Parameters:
type - The PKCS#11 type of this attribute; e.g. PKCS11Constants.CKA_VALUE.
Method Detail

setMechanismAttributeArrayValue

public void setMechanismAttributeArrayValue(Mechanism[] value)
Set the attributes of this mechanism attribute array by specifying a Mechanism[]. Null, is also valid. A call to this method sets the present flag to true.
Parameters:
value - The MechanismArrayAttribute value to set. May be null.

getMechanismAttributeArrayValue

public Mechanism[] getMechanismAttributeArrayValue()
Get the mechanism attribute array value of this attribute as Mechanism[]. Null, is also possible.
Returns:
The mechanism attribute array value of this attribute or null.

getValueString

protected java.lang.String getValueString()
Get a string representation of the value of this attribute.
Overrides:
getValueString in class Attribute
Returns:
A string representation of the value of this attribute.

equalsValue

protected boolean equalsValue(java.lang.Object otherObject)
Description copied from class: Attribute
True, if both attribute values are null or if both attribute values are equal. False, otherwise.
Overrides:
equalsValue in class Attribute
Following copied from class: iaik.pkcs.pkcs11.objects.Attribute
Parameters:
otherObject - The other object to compare to.
Returns:
True, if both attribute values are null or if both attribute values are equal. False, otherwise.

hashCode

public int hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
Overrides:
hashCode in class Attribute
Returns:
The hash code of this object.

clone

public java.lang.Object clone()
Create a (deep) clone of this object. The attributes in the CK_ATTRIBUTE[] need not be cloned, as they can't be set separately.
Overrides:
clone in class Attribute
Returns:
A clone of this object.

setValue

public void setValue(java.lang.Object value)
              throws java.lang.UnsupportedOperationException
Description copied from class: Attribute
Redirects the request for setting the attribute value to the implementing attribute class.
Overrides:
setValue in class Attribute
Following copied from class: iaik.pkcs.pkcs11.objects.Attribute
Parameters:
value - the new value
Throws:
ClassCastException - the given value type is not valid for this very Attribute.
java.lang.UnsupportedOperationException - the OtherAttribute implementation does not support setting a value directly.

IAIK PKCS#11 Wrapper
version 1.5

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.5