Package org.mozilla.jss.crypto
Class KBKDFByteArrayParam
java.lang.Object
org.mozilla.jss.util.NativeEnclosure
org.mozilla.jss.crypto.KBKDFDataParameter
org.mozilla.jss.crypto.KBKDFByteArrayParam
- All Implemented Interfaces:
AutoCloseable
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 Summary
FieldsFields inherited from class org.mozilla.jss.crypto.KBKDFDataParameter
type
Fields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Allocate native resources, setting mPointer and mPointerSize as appropriate.private void
protected void
Called to deallocate native resources; note that mPointer.close() is called afterwards.private void
void
setByteArray
(byte[] data) void
Zero out the copied contents of the byte array.Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Field Details
-
data
private byte[] data
-
-
Constructor Details
-
KBKDFByteArrayParam
public KBKDFByteArrayParam() -
KBKDFByteArrayParam
- Throws:
IllegalArgumentException
-
-
Method Details
-
setByteArray
- 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
Description copied from class:NativeEnclosure
Allocate native resources, setting mPointer and mPointerSize as appropriate.- Specified by:
acquireNativeResources
in classNativeEnclosure
- Throws:
Exception
-
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 classNativeEnclosure
- Throws:
Exception
-
acquireNativeResourcesInternal
- Throws:
Exception
-
releaseNativeResourcesInternal
- Throws:
Exception
-