public enum CloudHsmKeyAttributes extends java.lang.Enum<CloudHsmKeyAttributes>
IMPORTANT NOTE: Not all of these attributes are writeable to a HSM via the CloudHSM JCE provider. Attributes that can only be read from a HSM are noted as such.
For a thorough explanation of these key attributes, please refer to the Official PKCS #11 Cryptographic Token Interface Base Specification Version 2.40, Key Objects.
| Enum Constant and Description |
|---|
CKA_CLASS
Can only be read from the HSM.
|
CKA_DECRYPT |
CKA_DERIVE
Can only be read from the HSM.
|
CKA_ENCRYPT |
CKA_EXTRACTABLE |
CKA_KEY_TYPE
Can only be read from the HSM.
|
CKA_LABEL |
CKA_LOCAL
Can only be read from the HSM.
|
CKA_MODULUS
Can only be read from the HSM.
|
CKA_MODULUS_BITS
Can only be read from the HSM.
|
CKA_PRIVATE |
CKA_PUBLIC_EXPONENT
Can only be read from the HSM.
|
CKA_SIGN |
CKA_TOKEN
This attribute is often called by a different name in Cavium APIs,
persistent. |
CKA_UNWRAP |
CKA_VALUE_LEN
Can only be read from the HSM.
|
CKA_VERIFY |
CKA_WRAP |
UNKNOWN
For internal use only.
|
| Modifier and Type | Method and Description |
|---|---|
static CloudHsmKeyAttributesMap |
fromCavium(byte[] attributes)
Convert a Cavium-compliant byte array into a CloudHSM key attributes object,
CloudHsmKeyAttributesMap. |
static CloudHsmKeyAttributesMap |
fromCavium(com.cavium.key.CaviumKey key)
Retrieve a
CaviumKey's current key attributes and values from a HSM. |
static CloudHsmKeyAttributesMap |
fromCavium(long keyHandle)
Retrieve a key's current key attributes and values from a HSM.
|
java.lang.Class<?> |
getAttrClass()
Retrieve the Java data type associated with this key attribute's value.
|
static CloudHsmKeyAttributes |
getAttrFromId(java.lang.Integer attrId)
Map a key attribute ID to its corresponding
CloudHsmKeyAttributes value. |
int |
getAttrId()
Retrieve the PKCS#11 attribute ID for this key attribute.
|
static byte[] |
toCavium(CloudHsmKeyAttributesMap keyAttributesMap)
For internal use only.
|
static byte[] |
toCavium(CloudHsmKeyPairAttributesMap keyPairAttributesMap)
For internal use only.
|
static CloudHsmKeyAttributes |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CloudHsmKeyAttributes[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CloudHsmKeyAttributes CKA_CLASS
public static final CloudHsmKeyAttributes CKA_TOKEN
persistent.public static final CloudHsmKeyAttributes CKA_PRIVATE
public static final CloudHsmKeyAttributes CKA_LABEL
public static final CloudHsmKeyAttributes CKA_KEY_TYPE
public static final CloudHsmKeyAttributes CKA_ENCRYPT
public static final CloudHsmKeyAttributes CKA_DECRYPT
public static final CloudHsmKeyAttributes CKA_WRAP
public static final CloudHsmKeyAttributes CKA_UNWRAP
public static final CloudHsmKeyAttributes CKA_SIGN
public static final CloudHsmKeyAttributes CKA_VERIFY
public static final CloudHsmKeyAttributes CKA_DERIVE
public static final CloudHsmKeyAttributes CKA_MODULUS
public static final CloudHsmKeyAttributes CKA_MODULUS_BITS
public static final CloudHsmKeyAttributes CKA_PUBLIC_EXPONENT
public static final CloudHsmKeyAttributes CKA_VALUE_LEN
public static final CloudHsmKeyAttributes CKA_EXTRACTABLE
public static final CloudHsmKeyAttributes CKA_LOCAL
public static final CloudHsmKeyAttributes UNKNOWN
public static CloudHsmKeyAttributes[] values()
for (CloudHsmKeyAttributes c : CloudHsmKeyAttributes.values()) System.out.println(c);
public static CloudHsmKeyAttributes valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int getAttrId()
public java.lang.Class<?> getAttrClass()
public static CloudHsmKeyAttributes getAttrFromId(java.lang.Integer attrId) throws java.security.InvalidParameterException
CloudHsmKeyAttributes value.attrId - A PKCS#11 attribute ID.UNKNOWN if the attrId is non-null and not supported by
CloudHSM.java.security.InvalidParameterException - Thrown if attrId is null.public static CloudHsmKeyAttributesMap fromCavium(com.cavium.key.CaviumKey key)
CaviumKey's current key attributes and values from a HSM.
This will retrieve the key's attributes and values from the HSM as they are configured at the
time this method is called. This is particularly useful if key is modified by
external processes.
key - A CaviumKey instance whose attributes are to be read.CloudHsmKeyAttributesMap containing the key's attributes and
values.public static CloudHsmKeyAttributesMap fromCavium(long keyHandle)
This will retrieve the key's attributes and values from the HSM as they are configured at the
time this method is called. This is particularly useful if the key represented by
keyHandle is modified by external processes.
keyHandle - A CaviumKey's key handle whose attributes are to be read.CloudHsmKeyAttributesMap containing the key's attributes and
values.public static CloudHsmKeyAttributesMap fromCavium(byte[] attributes)
CloudHsmKeyAttributesMap.
For internal use only.
attributes - Key attributes and values as stored in a Cavium-specific format.CloudHsmKeyAttributesMap containing the key's attributes and
values.public static byte[] toCavium(CloudHsmKeyAttributesMap keyAttributesMap)
public static byte[] toCavium(CloudHsmKeyPairAttributesMap keyPairAttributesMap)