Package org.mozilla.jss.pkcs11.attrs
Class CKAUsage
java.lang.Object
org.mozilla.jss.util.NativeEnclosure
org.mozilla.jss.pkcs11.attrs.CKAttribute
org.mozilla.jss.pkcs11.attrs.CKAUsage
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
CKAUsage.Decrypt,CKAUsage.Derive,CKAUsage.Encrypt,CKAUsage.Sign,CKAUsage.SignRecover,CKAUsage.Unwrap,CKAUsage.Verify,CKAUsage.VerifyRecover,CKAUsage.Wrap
CKAUsage is a collection of PKCS#11 CK_ATTRIBUTES which have common value
(CK_TRUE).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCKADecrypt is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_DECRYPT and value CK_TRUE.static classCKADerive is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_DERIVE and value CK_TRUE.static classCKAEncrypt is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_ENCRYPT and value CK_TRUE.static classCKASign is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_SIGN and value CK_TRUE.static classCKASignRecover is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_SIGN_RECOVER and value CK_TRUE.static classCKAUnwrap is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_UNWRAP and value CK_TRUE.static classCKAVerify is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_VERIFY and value CK_TRUE.static classCKAVerifyRecover is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_VERIFY_RECOVER and value CK_TRUE.static classCKAWrap is an instance of PKCS#11 CK_ATTRIBUTE with type = CKA_WRAP and value CK_TRUE. -
Field Summary
Fields inherited from class org.mozilla.jss.pkcs11.attrs.CKAttribute
typeFields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize -
Constructor Summary
ConstructorsConstructorDescriptionCKAUsage(long type) Representation of a PKCS#11 CK_ATTRIBUTE with custom type, setting the value to CK_TRUE. -
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.Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Constructor Details
-
CKAUsage
public CKAUsage(long type) Representation of a PKCS#11 CK_ATTRIBUTE with custom type, setting the value to CK_TRUE. Note: it is generally recommended to use the subclasses of this class instead of providing a custom value.
-
-
Method Details
-
acquireNativeResources
protected void acquireNativeResources()Description copied from class:NativeEnclosureAllocate native resources, setting mPointer and mPointerSize as appropriate.- Specified by:
acquireNativeResourcesin classNativeEnclosure
-
releaseNativeResources
protected void 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
-