public abstract class Attribute extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Attribute()
Empty constructor.
|
protected |
Attribute(Long type)
Constructor taking the PKCS#11 type of the attribute.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object otherObject)
True, if both attributes are not present or if both attributes are
present and all other member variables are equal.
|
protected static Class<?> |
getAttributeClass(Long type)
Get the class of the given attribute type.
|
protected static String |
getAttributeName(Long type)
Get the name of the given attribute type.
|
protected sun.security.pkcs11.wrapper.CK_ATTRIBUTE |
getCkAttribute()
Get the CK_ATTRIBUTE object of this Attribute that contains the attribute
type and value .
|
protected Long |
getType()
Get the PKCS#11 type of this attribute.
|
protected 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.
|
protected void |
setCkAttribute(sun.security.pkcs11.wrapper.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(Long type)
Set the PKCS#11 type of this attribute.
|
abstract void |
setValue(Object value)
Redirects the request for setting the attribute value to the implementing
attribute class.
|
String |
toString()
Get a string representation of this attribute.
|
String |
toString(boolean withName)
Get a string representation of this attribute.
|
public static final Long CLASS
public static final Long TOKEN
public static final Long PRIVATE
public static final Long LABEL
public static final Long APPLICATION
public static final Long VALUE
public static final Long OBJECT_ID
public static final Long CERTIFICATE_TYPE
public static final Long ISSUER
public static final Long SERIAL_NUMBER
public static final Long URL
public static final Long HASH_OF_SUBJECT_PUBLIC_KEY
public static final Long HASH_OF_ISSUER_PUBLIC_KEY
public static final Long JAVA_MIDP_SECURITY_DOMAIN
public static final Long AC_ISSUER
public static final Long OWNER
public static final Long ATTR_TYPES
public static final Long TRUSTED
public static final Long KEY_TYPE
public static final Long SUBJECT
public static final Long ID
public static final Long CHECK_VALUE
public static final Long CERTIFICATE_CATEGORY
public static final Long SENSITIVE
public static final Long ENCRYPT
public static final Long DECRYPT
public static final Long WRAP
public static final Long WRAP_TEMPLATE
public static final Long UNWRAP
public static final Long UNWRAP_TEMPLATE
public static final Long SIGN
public static final Long SIGN_RECOVER
public static final Long VERIFY
public static final Long VERIFY_RECOVER
public static final Long DERIVE
public static final Long START_DATE
public static final Long END_DATE
public static final Long MECHANISM_TYPE
public static final Long MODULUS
public static final Long MODULUS_BITS
public static final Long PUBLIC_EXPONENT
public static final Long PRIVATE_EXPONENT
public static final Long PRIME_1
public static final Long PRIME_2
public static final Long EXPONENT_1
public static final Long EXPONENT_2
public static final Long COEFFICIENT
public static final Long PRIME
public static final Long SUBPRIME
public static final Long BASE
public static final Long PRIME_BITS
public static final Long SUB_PRIME_BITS
public static final Long VALUE_BITS
public static final Long VALUE_LEN
public static final Long EXTRACTABLE
public static final Long LOCAL
public static final Long NEVER_EXTRACTABLE
public static final Long WRAP_WITH_TRUSTED
public static final Long ALWAYS_SENSITIVE
public static final Long ALWAYS_AUTHENTICATE
public static final Long KEY_GEN_MECHANISM
public static final Long ALLOWED_MECHANISMS
public static final Long MODIFIABLE
public static final Long EC_PARAMS
public static final Long EC_POINT
public static final Long SECONDARY_AUTH
public static final Long AUTH_PIN_FLAGS
public static final Long HW_FEATURE_TYPE
public static final Long RESET_ON_INIT
public static final Long HAS_RESET
public static final Long VENDOR_DEFINED
public static final Long PIXEL_X
public static final Long PIXEL_Y
public static final Long RESOLUTION
public static final Long CHAR_ROWS
public static final Long CHAR_COLUMNS
public static final Long COLOR
public static final Long BITS_PER_PIXEL
public static final Long CHAR_SETS
public static final Long ENCODING_METHODS
public static final Long MIME_TYPES
protected boolean present
protected boolean sensitive
protected sun.security.pkcs11.wrapper.CK_ATTRIBUTE ckAttribute
protected Attribute()
protected Attribute(Long type)
type - The PKCS#11 type of this attribute; e.g.
PKCS11Constants.CKA_PRIVATE.protected static String getAttributeName(Long type)
type - The attribute type.protected static Class<?> getAttributeClass(Long type)
type - The attribute type.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(Object value)
value - the new valueClassCastException - the given value type is not valid for this very
Attribute.UnsupportedOperationException - the OtherAttribute implementation does not support
setting a value directly.protected void setCkAttribute(sun.security.pkcs11.wrapper.CK_ATTRIBUTE ckAttribute)
ckAttribute - The new CK_ATTRIBUTE of this Attribute.public boolean isPresent()
public boolean isSensitive()
protected sun.security.pkcs11.wrapper.CK_ATTRIBUTE getCkAttribute()
protected String getValueString()
public String toString()
public 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(Long type)
type - The PKCS#11 type of this attribute.protected Long getType()
public boolean equals(Object otherObject)
Copyright © 2018. All rights reserved.