Package org.mozilla.jss.crypto
Class KBKDFFeedbackParams
- java.lang.Object
-
- org.mozilla.jss.util.NativeEnclosure
-
- org.mozilla.jss.crypto.KBKDFParameterSpec
-
- org.mozilla.jss.crypto.KBKDFFeedbackParams
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.security.spec.AlgorithmParameterSpec
,java.security.spec.KeySpec
public class KBKDFFeedbackParams extends KBKDFParameterSpec
-
-
Field Summary
-
Fields inherited from class org.mozilla.jss.crypto.KBKDFParameterSpec
additional_keys, derivedKeyAlgorithm, keySize, params, prf, prfKey
-
Fields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize
-
-
Constructor Summary
Constructors Constructor Description KBKDFFeedbackParams()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
acquireNativeResourcesInternal()
protected void
releaseNativeResourcesInternal()
void
setInitialValue(byte[] iv)
protected void
validateParameters()
Validate all class members prior to acquiring native resources.void
zeroInitialValue()
Zero out the copiend contents of the initial value.-
Methods inherited from class org.mozilla.jss.crypto.KBKDFParameterSpec
acquireNativeResources, addAdditionalDerivedKey, addParameter, releaseNativeResources, setAdditionalDerivedKeys, setDerivedKeyAlgorithm, setDerivedKeyAlgorithm, setKeySize, setParameters, setPRF, setPRF, setPRF, setPRFKey
-
Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
-
-
-
Method Detail
-
setInitialValue
public void setInitialValue(byte[] iv) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
zeroInitialValue
public void zeroInitialValue()
Zero out the copiend contents of the initial value. Call this method when the contents of the initial value are sensitive and they're done being used. Note that this isn't called during close() as a given KBKDFParameterSpec instance may be reused, updating relevant parameters between calls.
-
validateParameters
protected void validateParameters() throws java.lang.IllegalArgumentException
Description copied from class:KBKDFParameterSpec
Validate all class members prior to acquiring native resources. This is implemented by the derived KBKDF modes in an effort to give useful exceptions before derivation, instead of vague errors during derivation.- Specified by:
validateParameters
in classKBKDFParameterSpec
- Throws:
java.lang.IllegalArgumentException
-
acquireNativeResourcesInternal
protected void acquireNativeResourcesInternal() throws java.lang.Exception
- Specified by:
acquireNativeResourcesInternal
in classKBKDFParameterSpec
- Throws:
java.lang.Exception
-
releaseNativeResourcesInternal
protected void releaseNativeResourcesInternal() throws java.lang.Exception
- Specified by:
releaseNativeResourcesInternal
in classKBKDFParameterSpec
- Throws:
java.lang.Exception
-
-