Class KBKDFIterationVariableParam

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class KBKDFIterationVariableParam
    extends KBKDFDataParameter
    A KBKDF Iteration Variable Parameter is a type of KBKDF Data Parameter that either references the counter variable or otherwise is a pointer to the output of the previous PRF invocation. Note that in when used with Counter Mode KBKDF, this parameter must be initialized with the two argument constructor. In other KBKDF modes, in particular, Feedback and Pipeline modes, this must be initialized with the no argument constructor. To add an optional counter to the PRF input stream under Feedback and Pipeline modes, use KBKDFOptionalCounterParam instead.
    • Field Detail

      • littleEndian

        protected boolean littleEndian
      • widthInBits

        protected long widthInBits
    • Constructor Detail

      • KBKDFIterationVariableParam

        public KBKDFIterationVariableParam()
      • KBKDFIterationVariableParam

        public KBKDFIterationVariableParam​(boolean littleEndian,
                                           long widthInBits)
                                    throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • setCounterSpec

        public void setCounterSpec​(boolean littleEndian,
                                   long widthInBits)
                            throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • acquireNativeResources

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

        protected void releaseNativeResources()
                                       throws java.lang.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:
        java.lang.Exception