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:
AutoCloseable
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
FieldsFields inherited from class org.mozilla.jss.crypto.KBKDFDataParameter
typeFields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAllocate native resources, setting mPointer and mPointerSize as appropriate.protected voidCalled to deallocate native resources; note that mPointer.close() is called afterwards.voidsetCounterSpec(boolean littleEndian, long widthInBits) Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Field Details
-
littleEndian
protected boolean littleEndian -
widthInBits
protected long widthInBits
-
-
Constructor Details
-
KBKDFIterationVariableParam
public KBKDFIterationVariableParam() -
KBKDFIterationVariableParam
public KBKDFIterationVariableParam(boolean littleEndian, long widthInBits) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
setCounterSpec
- Throws:
IllegalArgumentException
-
acquireNativeResources
Description copied from class:NativeEnclosureAllocate native resources, setting mPointer and mPointerSize as appropriate.- Specified by:
acquireNativeResourcesin classNativeEnclosure- Throws:
Exception
-
releaseNativeResources
Description copied from class:NativeEnclosureCalled 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:
releaseNativeResourcesin classNativeEnclosure- Throws:
Exception
-