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 Summary

    Fields
    Modifier and Type
    Field
    Description
    private long
     

    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
    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

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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