Package org.mozilla.jss.crypto
Class KBKDFDerivedKey
java.lang.Object
org.mozilla.jss.util.NativeEnclosure
org.mozilla.jss.crypto.KBKDFDerivedKey
- All Implemented Interfaces:
AutoCloseable
Class for supporting additional derived keys from PKCS#11 v3.0's
SP800-108 KBKDF implementation.
-
Field Summary
FieldsFields 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.protected void
void
addAttribute
(CKAttribute attr) private SymmetricKey
getKeyFromHandle
(SymmetricKey parentKey, long mech, boolean temporary) protected void
Called to deallocate native resources; note that mPointer.close() is called afterwards.protected void
void
setAttributes
(CKAttribute[] attrs) Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Field Details
-
attrs
-
handle
private long handle
-
-
Constructor Details
-
KBKDFDerivedKey
public KBKDFDerivedKey() -
KBKDFDerivedKey
- Throws:
IllegalArgumentException
-
-
Method Details
-
setAttributes
- Throws:
IllegalArgumentException
-
addAttribute
- Throws:
IllegalArgumentException
-
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
-
getKey
- Throws:
Exception
-
getKeyFromHandle
private SymmetricKey getKeyFromHandle(SymmetricKey parentKey, long mech, boolean temporary) throws Exception - Throws:
Exception
-
acquireNativeResourcesInternal
- Throws:
Exception
-
releaseNativeResourcesInternal
- Throws:
Exception
-