public class LunaPkcs11Attributes
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
PRIVATE
private attribute template key type
|
static int |
PUBLIC
public attribute template key type
|
static int |
SECRET
secret attribute template key type
|
Constructor and Description |
---|
LunaPkcs11Attributes() |
LunaPkcs11Attributes(LunaPkcs11Attributes other) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(LunaPkcs11Attributes other) |
boolean |
equals(java.lang.Object other) |
boolean |
getBooleanAttribute(int keyType,
long attribute)
Gets the value for a boolean attribute.
|
long[] |
getBooleanAttributeTypes(int keyType) |
byte[] |
getByteArrayAttribute(int keyType,
long attribute)
Gets the value for a byte array attribute.
|
long[] |
getByteArrayAttributeTypes(int keyType) |
long |
getLongAttribute(int keyType,
long attribute)
Gets the value for a long attribute.
|
long[] |
getLongAttributeTypes(int keyType) |
boolean |
isBooleanAttributeSet(int keyType,
long attribute)
Checks if the boolean attribute has been set
|
boolean |
isByteArrayAttributeSet(int keyType,
long attribute)
Checks if the byte array attribute has been set
|
boolean |
isLongAttributeSet(int keyType,
long attribute)
Checks if the long attribute has been set
|
void |
setBooleanAttribute(int keyType,
long attribute,
boolean enabled)
Sets the value for a boolean attribute.
|
void |
setByteArrayAttribute(int keyType,
long attribute,
byte[] value)
Sets the value for a byte array attribute.
|
void |
setLongAttribute(int keyType,
long attribute,
long value)
Sets the value for a long attribute.
|
public static final int PUBLIC
public static final int PRIVATE
public static final int SECRET
public LunaPkcs11Attributes()
public LunaPkcs11Attributes(LunaPkcs11Attributes other)
public void setBooleanAttribute(int keyType, long attribute, boolean enabled)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typeenabled
- the boolean attribute valuepublic boolean getBooleanAttribute(int keyType, long attribute)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typepublic boolean isBooleanAttributeSet(int keyType, long attribute)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typepublic void setLongAttribute(int keyType, long attribute, long value)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typevalue
- the long attribute valuepublic long getLongAttribute(int keyType, long attribute)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typepublic boolean isLongAttributeSet(int keyType, long attribute)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typepublic void setByteArrayAttribute(int keyType, long attribute, byte[] value)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typevalue
- the byte array attribute valuepublic byte[] getByteArrayAttribute(int keyType, long attribute)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typepublic boolean isByteArrayAttributeSet(int keyType, long attribute)
keyType
- PUBLIC, PRIVATE or SECRET key type attribute templateattribute
- the PKCS11 attribute typepublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean equals(LunaPkcs11Attributes other)
public long[] getBooleanAttributeTypes(int keyType)
public long[] getLongAttributeTypes(int keyType)
public long[] getByteArrayAttributeTypes(int keyType)
Copyright 2014-2018 SafeNet. All rights reserved.