Package org.mozilla.jss.pkcs11.attrs
Class CKAValueLen
java.lang.Object
org.mozilla.jss.util.NativeEnclosure
org.mozilla.jss.pkcs11.attrs.CKAttribute
org.mozilla.jss.pkcs11.attrs.CKAValueLen
- All Implemented Interfaces:
AutoCloseable
CKAClass is an instance of a PKCS#11 CK_ATTRIBUTE with type = CKA_CLASS.
-
Field Summary
FieldsFields inherited from class org.mozilla.jss.pkcs11.attrs.CKAttribute
type
Fields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize
-
Constructor Summary
ConstructorsConstructorDescriptionRepresentation of a PKCS#11 CK_ATTRIBUTE with type CKA_VALUE_LEN and default length for the key type.CKAValueLen
(long length) Representation of a PKCS#11 CK_ATTRIBUTE with type CKA_VALUE_LEN and a specified length. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Allocate native resources, setting mPointer and mPointerSize as appropriate.long
Get the length of this CKA_VALUE_LEN attribute.protected void
Called to deallocate native resources; note that mPointer.close() is called afterwards.void
setLength
(long length) Set the length specified by this CKA_VALUE_LEN attribute.Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Field Details
-
length
private long length
-
-
Constructor Details
-
CKAValueLen
public CKAValueLen()Representation of a PKCS#11 CK_ATTRIBUTE with type CKA_VALUE_LEN and default length for the key type. Note that when key type is not specified and/or that mechanism lacks a default size, the corresponding PKCS#11 call will error out. -
CKAValueLen
public CKAValueLen(long length) Representation of a PKCS#11 CK_ATTRIBUTE with type CKA_VALUE_LEN and a specified length.
-
-
Method Details
-
setLength
public void setLength(long length) Set the length specified by this CKA_VALUE_LEN attribute. -
getLength
public long getLength()Get the length of this CKA_VALUE_LEN attribute. -
acquireNativeResources
protected void acquireNativeResources()Description copied from class:NativeEnclosure
Allocate native resources, setting mPointer and mPointerSize as appropriate.- Specified by:
acquireNativeResources
in classNativeEnclosure
-
releaseNativeResources
protected void releaseNativeResources()Description copied from class:NativeEnclosure
Called 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:
releaseNativeResources
in classNativeEnclosure
-