Package org.mozilla.jss.pkcs11.attrs
Class CKAClass
java.lang.Object
org.mozilla.jss.util.NativeEnclosure
org.mozilla.jss.pkcs11.attrs.CKAttribute
org.mozilla.jss.pkcs11.attrs.CKAClass
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
CKAClass.Certificate,CKAClass.Data,CKAClass.DomainParameters,CKAClass.HWFeature,CKAClass.Mechanism,CKAClass.PrivateKey,CKAClass.PublicKey,CKAClass.SecretKey
CKAClass is an instance of a PKCS#11 CK_ATTRIBUTE with type = CKA_CLASS.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_CERTIFICATE.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_DATA.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_DOMAIN_PARAMETERS.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_HW_FEATURE.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_MECHANISM.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_PRIVATE_KEY.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_PUBLIC_KEY.static classRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and value CKO_SECRET_KEY. -
Field Summary
FieldsFields inherited from class org.mozilla.jss.pkcs11.attrs.CKAttribute
typeFields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize -
Constructor Summary
ConstructorsConstructorDescriptionCKAClass(long value) Representation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and a custom value. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAllocate native resources, setting mPointer and mPointerSize as appropriate.longgetValue()Get the value of this CKA_CLASS attribute.protected voidCalled to deallocate native resources; note that mPointer.close() is called afterwards.voidsetValue(long value) Set the value of this CKA_CLASS attribute.Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Field Details
-
value
private long value
-
-
Constructor Details
-
CKAClass
public CKAClass(long value) Representation of a PKCS#11 CK_ATTRIBUTE with type CKA_CLASS and a custom value. Note: it is generally recommended to use the subclasses of this class instead of providing a custom value.
-
-
Method Details
-
setValue
public void setValue(long value) Set the value of this CKA_CLASS attribute. -
getValue
public long getValue()Get the value of this CKA_CLASS attribute. -
acquireNativeResources
protected void acquireNativeResources()Description copied from class:NativeEnclosureAllocate native resources, setting mPointer and mPointerSize as appropriate.- Specified by:
acquireNativeResourcesin classNativeEnclosure
-
releaseNativeResources
protected void releaseNativeResources()Description copied from class:NativeEnclosureCalled to deallocate native resources; note that mPointer.close() is called afterwards. If mPointer.close() should be a no-op, extend from StaticVoidRef and do any required cleanup here.- Specified by:
releaseNativeResourcesin classNativeEnclosure
-