Package org.mozilla.jss.crypto
Class KBKDFIterationVariableParam
- java.lang.Object
-
- org.mozilla.jss.util.NativeEnclosure
-
- org.mozilla.jss.crypto.KBKDFDataParameter
-
- org.mozilla.jss.crypto.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 Summary
Fields Modifier and Type Field Description protected boolean
littleEndian
protected long
widthInBits
-
Fields inherited from class org.mozilla.jss.crypto.KBKDFDataParameter
type
-
Fields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize
-
-
Constructor Summary
Constructors Constructor Description KBKDFIterationVariableParam()
KBKDFIterationVariableParam(boolean littleEndian, long widthInBits)
-
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.protected void
releaseNativeResources()
Called to deallocate native resources; note that mPointer.close() is called afterwards.void
setCounterSpec(boolean littleEndian, long widthInBits)
-
Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
-
-
-
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 classNativeEnclosure
- 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 classNativeEnclosure
- Throws:
java.lang.Exception
-
-