The P11Digest implementation should support cloning, if the underlying PKCS#11 library supports it. This means dynamically determining if the token supports C_GetOperationState() and C_SetOperationState() for digests and returning an instance of the appropriate P11Digest class as a result (that implements the Cloneable interface or that does not).
|