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 voidAllocate native resources, setting mPointer and mPointerSize as appropriate.protected voidvoidaddAttribute(CKAttribute attr) private SymmetricKeygetKeyFromHandle(SymmetricKey parentKey, long mech, boolean temporary) protected voidCalled to deallocate native resources; note that mPointer.close() is called afterwards.protected voidvoidsetAttributes(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: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
-
getKey
- Throws:
Exception
-
getKeyFromHandle
private SymmetricKey getKeyFromHandle(SymmetricKey parentKey, long mech, boolean temporary) throws Exception - Throws:
Exception
-
acquireNativeResourcesInternal
- Throws:
Exception
-
releaseNativeResourcesInternal
- Throws:
Exception
-