Class JournaledAlgorithm

java.lang.Object
org.bouncycastle.crypto.util.JournaledAlgorithm
All Implemented Interfaces:
Serializable, Encodable

public class JournaledAlgorithm extends Object implements Encodable, Serializable
JournaledAlgorithm keeps state of the JournalingSecureRandom and the AlgorithmIdentifier necessary to fully resume an encryption session. This class can be used to retrieve a session even if a process is completely stopped. NOTE: This should be used with a shutdown hook to save the state of the journaling and the algorithm identifier even in the case of a forced shutdown.

The raw encoding is in ASN.1 format.

Details: Use serialization of critical parameters of the the JournalingSecureRandom and AlgorithmIdentifier. Because these two classes are not serializable, create interior class to serialize only the critical parameters in the form of byte[] arrays

See Also: