Class CKAValueLen

All Implemented Interfaces:
AutoCloseable

public class CKAValueLen extends CKAttribute
CKAClass is an instance of a PKCS#11 CK_ATTRIBUTE with type = CKA_CLASS.
  • 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 class NativeEnclosure
    • 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 class NativeEnclosure