Class KBKDFByteArrayParam

All Implemented Interfaces:
AutoCloseable

public class KBKDFByteArrayParam extends KBKDFDataParameter
A KBKDF Byte Array Parameter is a type of KBKDF Data Parameter that contains a single byte array that gets passed to the KBKDF to be inserted into the PRF input stream.
  • Field Details

    • data

      private byte[] data
  • Constructor Details

  • Method Details

    • setByteArray

      public void setByteArray(byte[] data) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • zeroByteArray

      public void zeroByteArray()
      Zero out the copied contents of the byte array. Call this method when the contents of this byte array parameter are sensitive and they're done being used. Note that this isn't called during close() as a given byte array parameter may be used multiple times in different KBKDF calls.
    • acquireNativeResources

      protected void acquireNativeResources() throws Exception
      Description copied from class: NativeEnclosure
      Allocate native resources, setting mPointer and mPointerSize as appropriate.
      Specified by:
      acquireNativeResources in class NativeEnclosure
      Throws:
      Exception
    • releaseNativeResources

      protected void releaseNativeResources() throws Exception
      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
      Throws:
      Exception
    • acquireNativeResourcesInternal

      private void acquireNativeResourcesInternal() throws Exception
      Throws:
      Exception
    • releaseNativeResourcesInternal

      private void releaseNativeResourcesInternal() throws Exception
      Throws:
      Exception