public abstract class Attribute
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.Long |
AC_ISSUER |
static java.lang.Long |
ALLOWED_MECHANISMS |
static java.lang.Long |
ALWAYS_AUTHENTICATE |
static java.lang.Long |
ALWAYS_SENSITIVE |
static java.lang.Long |
APPLICATION |
static java.lang.Long |
ATTR_TYPES |
protected static java.util.Hashtable |
attributeClasses_ |
protected static java.util.Hashtable |
attributeNames_ |
static java.lang.Long |
AUTH_PIN_FLAGS |
static java.lang.Long |
BASE |
static java.lang.Long |
BITS_PER_PIXEL |
static java.lang.Long |
CERTIFICATE_CATEGORY |
static java.lang.Long |
CERTIFICATE_TYPE |
static java.lang.Long |
CHAR_COLUMNS |
static java.lang.Long |
CHAR_ROWS |
static java.lang.Long |
CHAR_SETS |
static java.lang.Long |
CHECK_VALUE |
protected CK_ATTRIBUTE |
ckAttribute_
The CK_ATTRIBUTE that is used to hold the PKCS#11 type of this attribute and the value.
|
static java.lang.Long |
CLASS |
static java.lang.Long |
COEFFICIENT |
static java.lang.Long |
COLOR |
static java.lang.Long |
DECRYPT |
static java.lang.Long |
DERIVE |
static java.lang.Long |
EC_PARAMS |
static java.lang.Long |
EC_POINT |
static java.lang.Long |
ECDSA_PARAMS |
static java.lang.Long |
ENCODING_METHODS |
static java.lang.Long |
ENCRYPT |
static java.lang.Long |
END_DATE |
static java.lang.Long |
EXPONENT_1 |
static java.lang.Long |
EXPONENT_2 |
static java.lang.Long |
EXTRACTABLE |
static java.lang.Long |
HAS_RESET |
static java.lang.Long |
HASH_OF_ISSUER_PUBLIC_KEY |
static java.lang.Long |
HASH_OF_SUBJECT_PUBLIC_KEY |
static java.lang.Long |
HW_FEATURE_TYPE |
static java.lang.Long |
ID |
static java.lang.Long |
ISSUER |
static java.lang.Long |
JAVA_MIDP_SECURITY_DOMAIN |
static java.lang.Long |
KEY_GEN_MECHANISM |
static java.lang.Long |
KEY_TYPE |
static java.lang.Long |
LABEL |
static java.lang.Long |
LOCAL |
static java.lang.Long |
MECHANISM_TYPE |
static java.lang.Long |
MIME_TYPES |
static java.lang.Long |
MODIFIABLE |
static java.lang.Long |
MODULUS |
static java.lang.Long |
MODULUS_BITS |
static java.lang.Long |
NEVER_EXTRACTABLE |
static java.lang.Long |
OBJECT_ID |
static java.lang.Long |
OWNER |
static java.lang.Long |
PIXEL_X |
static java.lang.Long |
PIXEL_Y |
protected boolean |
present_
True, if the object really possesses this attribute.
|
static java.lang.Long |
PRIME |
static java.lang.Long |
PRIME_1 |
static java.lang.Long |
PRIME_2 |
static java.lang.Long |
PRIME_BITS |
static java.lang.Long |
PRIVATE |
static java.lang.Long |
PRIVATE_EXPONENT |
static java.lang.Long |
PUBLIC_EXPONENT |
static java.lang.Long |
RESET_ON_INIT |
static java.lang.Long |
RESOLUTION |
static java.lang.Long |
SECONDARY_AUTH |
static java.lang.Long |
SENSITIVE |
protected boolean |
sensitive_
True, if this attribute is sensitive.
|
static java.lang.Long |
SERIAL_NUMBER |
static java.lang.Long |
SIGN |
static java.lang.Long |
SIGN_RECOVER |
static java.lang.Long |
START_DATE |
protected boolean |
stateKnown_
True, if this attribute's status (i.e.
|
static java.lang.Long |
SUB_PRIME_BITS |
static java.lang.Long |
SUBJECT |
static java.lang.Long |
SUBPRIME |
static java.lang.Long |
TOKEN |
static java.lang.Long |
TRUSTED |
static java.lang.Long |
UNWRAP |
static java.lang.Long |
UNWRAP_TEMPLATE |
static java.lang.Long |
URL |
static java.lang.Long |
VALUE |
static java.lang.Long |
VALUE_BITS |
static java.lang.Long |
VALUE_LEN |
static java.lang.Long |
VENDOR_DEFINED |
static java.lang.Long |
VERIFY |
static java.lang.Long |
VERIFY_RECOVER |
static java.lang.Long |
WRAP |
static java.lang.Long |
WRAP_TEMPLATE |
static java.lang.Long |
WRAP_WITH_TRUSTED |
Modifier | Constructor and Description |
---|---|
protected |
Attribute()
Empty constructor.
|
protected |
Attribute(java.lang.Long type)
Constructor taking the PKCS#11 type of the attribute.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create a (deep) clone of this object.
|
boolean |
equals(java.lang.Object otherObject)
True, if both attributes are not present or if both attributes are present and all other member
variables are equal.
|
protected boolean |
equalsValue(java.lang.Object otherObject)
True, if both attribute values are null or if both attribute values are equal.
|
protected static java.lang.Class |
getAttributeClass(java.lang.Long type)
Get the class of the given attribute type.
|
protected static java.lang.String |
getAttributeName(java.lang.Long type)
Get the name of the given attribute type.
|
protected CK_ATTRIBUTE |
getCkAttribute()
Get the CK_ATTRIBUTE object of this Attribute that contains the attribute type and value .
|
java.lang.Long |
getType()
Get the PKCS#11 type of this attribute.
|
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.
|
boolean |
isPresent()
Check, if this attribute is really present in the associated object.
|
boolean |
isSensitive()
Check, if this attribute is sensitive in the associated object.
|
boolean |
isStateKnown()
Check, if this attribute's status is known.
|
protected void |
setCkAttribute(CK_ATTRIBUTE ckAttribute)
Set the CK_ATTRIBUTE of this Attribute.
|
void |
setPresent(boolean present)
Set, if this attribute is really present in the associated object.
|
void |
setSensitive(boolean sensitive)
Set, if this attribute is sensitive in the associated object.
|
protected void |
setType(java.lang.Long type)
Set the PKCS#11 type of this attribute.
|
abstract void |
setValue(java.lang.Object value)
Redirects the request for setting the attribute value to the implementing attribute class.
|
java.lang.String |
toString()
Get a string representation of this attribute.
|
java.lang.String |
toString(boolean withName)
Get a string representation of this attribute.
|
public static final java.lang.Long CLASS
public static final java.lang.Long TOKEN
public static final java.lang.Long PRIVATE
public static final java.lang.Long LABEL
public static final java.lang.Long APPLICATION
public static final java.lang.Long VALUE
public static final java.lang.Long OBJECT_ID
public static final java.lang.Long CERTIFICATE_TYPE
public static final java.lang.Long ISSUER
public static final java.lang.Long SERIAL_NUMBER
public static final java.lang.Long URL
public static final java.lang.Long HASH_OF_SUBJECT_PUBLIC_KEY
public static final java.lang.Long HASH_OF_ISSUER_PUBLIC_KEY
public static final java.lang.Long JAVA_MIDP_SECURITY_DOMAIN
public static final java.lang.Long AC_ISSUER
public static final java.lang.Long OWNER
public static final java.lang.Long ATTR_TYPES
public static final java.lang.Long TRUSTED
public static final java.lang.Long KEY_TYPE
public static final java.lang.Long SUBJECT
public static final java.lang.Long ID
public static final java.lang.Long CHECK_VALUE
public static final java.lang.Long CERTIFICATE_CATEGORY
public static final java.lang.Long SENSITIVE
public static final java.lang.Long ENCRYPT
public static final java.lang.Long DECRYPT
public static final java.lang.Long WRAP
public static final java.lang.Long WRAP_TEMPLATE
public static final java.lang.Long UNWRAP
public static final java.lang.Long UNWRAP_TEMPLATE
public static final java.lang.Long SIGN
public static final java.lang.Long SIGN_RECOVER
public static final java.lang.Long VERIFY
public static final java.lang.Long VERIFY_RECOVER
public static final java.lang.Long DERIVE
public static final java.lang.Long START_DATE
public static final java.lang.Long END_DATE
public static final java.lang.Long MECHANISM_TYPE
public static final java.lang.Long MODULUS
public static final java.lang.Long MODULUS_BITS
public static final java.lang.Long PUBLIC_EXPONENT
public static final java.lang.Long PRIVATE_EXPONENT
public static final java.lang.Long PRIME_1
public static final java.lang.Long PRIME_2
public static final java.lang.Long EXPONENT_1
public static final java.lang.Long EXPONENT_2
public static final java.lang.Long COEFFICIENT
public static final java.lang.Long PRIME
public static final java.lang.Long SUBPRIME
public static final java.lang.Long BASE
public static final java.lang.Long PRIME_BITS
public static final java.lang.Long SUB_PRIME_BITS
public static final java.lang.Long VALUE_BITS
public static final java.lang.Long VALUE_LEN
public static final java.lang.Long EXTRACTABLE
public static final java.lang.Long LOCAL
public static final java.lang.Long NEVER_EXTRACTABLE
public static final java.lang.Long WRAP_WITH_TRUSTED
public static final java.lang.Long ALWAYS_SENSITIVE
public static final java.lang.Long ALWAYS_AUTHENTICATE
public static final java.lang.Long KEY_GEN_MECHANISM
public static final java.lang.Long ALLOWED_MECHANISMS
public static final java.lang.Long MODIFIABLE
public static final java.lang.Long ECDSA_PARAMS
public static final java.lang.Long EC_PARAMS
public static final java.lang.Long EC_POINT
public static final java.lang.Long SECONDARY_AUTH
public static final java.lang.Long AUTH_PIN_FLAGS
public static final java.lang.Long HW_FEATURE_TYPE
public static final java.lang.Long RESET_ON_INIT
public static final java.lang.Long HAS_RESET
public static final java.lang.Long VENDOR_DEFINED
public static final java.lang.Long PIXEL_X
public static final java.lang.Long PIXEL_Y
public static final java.lang.Long RESOLUTION
public static final java.lang.Long CHAR_ROWS
public static final java.lang.Long CHAR_COLUMNS
public static final java.lang.Long COLOR
public static final java.lang.Long BITS_PER_PIXEL
public static final java.lang.Long CHAR_SETS
public static final java.lang.Long ENCODING_METHODS
public static final java.lang.Long MIME_TYPES
protected static java.util.Hashtable attributeNames_
protected static java.util.Hashtable attributeClasses_
protected boolean present_
protected boolean sensitive_
protected boolean stateKnown_
protected CK_ATTRIBUTE ckAttribute_
protected Attribute()
protected Attribute(java.lang.Long type)
type
- The PKCS'11 type of this attribute; e.g. PKCS11Constants.CKA_PRIVATE.protected static java.lang.String getAttributeName(java.lang.Long type)
type
- The attribute type.protected static java.lang.Class getAttributeClass(java.lang.Long type)
type
- The attribute type.public java.lang.Object clone()
clone
in class java.lang.Object
public void setPresent(boolean present)
present
- True, if attribute is present.public void setSensitive(boolean sensitive)
sensitive
- True, if attribute is sensitive.public abstract void setValue(java.lang.Object value) throws java.lang.UnsupportedOperationException
value
- the new valuejava.lang.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.protected void setCkAttribute(CK_ATTRIBUTE ckAttribute)
ckAttribute
- The new CK_ATTRIBUTE of this Attribute.public boolean isPresent()
public boolean isSensitive()
public boolean isStateKnown()
protected CK_ATTRIBUTE getCkAttribute()
protected java.lang.String getValueString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean withName)
withName
- If true, the string contains the attribute type name and the value. If false, it just
contains the value.protected void setType(java.lang.Long type)
type
- The PKCS#11 type of this attribute.public java.lang.Long getType()
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
otherObject
- The other object to compare to.protected boolean equalsValue(java.lang.Object otherObject)
otherObject
- The other object to compare to.public int hashCode()
hashCode
in class java.lang.Object
IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.6.9