public abstract class KeyTemplate
extends java.lang.Object
implements java.io.Serializable, java.security.Key
Description:
Herein lies our most basic Key Template Definition to inspire all key template definitions
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.Long,sun.security.pkcs11.wrapper.CK_ATTRIBUTE> |
attributes
Attribute list to manage key with PKCS11 interface
|
protected long |
keyId |
protected java.lang.String |
label |
protected static org.slf4j.Logger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
KeyTemplate(java.lang.String label) |
Modifier and Type | Method and Description |
---|---|
KeyTemplate |
add(sun.security.pkcs11.wrapper.CK_ATTRIBUTE attribute)
Adds attribute for this key, overrides existing CK_ATTRIBUTE.type is unique
|
boolean |
containsAttribute(long attributeType) |
java.lang.Object |
getAttribute(long attributeType) |
java.util.List<sun.security.pkcs11.wrapper.CK_ATTRIBUTE> |
getAttributes()
gets Copy of attributes
|
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] |
getAttributesAsArr()
gets attribute as array
|
byte[] |
getEncoded() |
java.lang.String |
getFormat() |
long |
getKeyId() |
java.lang.String |
getLabel() |
void |
remove(long attributeType) |
void |
setKeyId(long keyId) |
protected static org.slf4j.Logger logger
protected java.lang.String label
protected long keyId
public java.util.Map<java.lang.Long,sun.security.pkcs11.wrapper.CK_ATTRIBUTE> attributes
public java.lang.String getLabel()
public long getKeyId()
public void setKeyId(long keyId)
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public KeyTemplate add(sun.security.pkcs11.wrapper.CK_ATTRIBUTE attribute)
attribute
- public void remove(long attributeType)
public java.lang.Object getAttribute(long attributeType)
public boolean containsAttribute(long attributeType)
public java.util.List<sun.security.pkcs11.wrapper.CK_ATTRIBUTE> getAttributes()
public sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] getAttributesAsArr()
Copyright © 2025. All rights reserved.