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:
java.lang.AutoCloseable
public class CKAValueLen extends CKAttribute
CKAClass is an instance of a PKCS#11 CK_ATTRIBUTE with type = CKA_CLASS.
-
-
Field Summary
-
Fields inherited from class org.mozilla.jss.pkcs11.attrs.CKAttribute
type
-
Fields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize
-
-
Constructor Summary
Constructors Constructor Description CKAValueLen()
Representation 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
acquireNativeResources()
Allocate native resources, setting mPointer and mPointerSize as appropriate.long
getLength()
Get the length of this CKA_VALUE_LEN attribute.protected void
releaseNativeResources()
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
-
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-