A trait defining a crypto operation that manipulates data (such as encryption or decryption).
Implementations of this trait are used to encrypt or decrypt data making use of a concrete algorithm. An instance can be viewed as a representation of a ''Cypher'' in the Java crypto API. The functions provided by this trait are derived from the life-cycle of such an object: it is initialized, chunks of data are passed to it for being transformed, and there is a notification of the end of the sequence to be transformed. The rather stateful nature of this trait is due to the interaction schemes used by the underlying Java API.
Notifies this object that all data has been processed. An implementation can yield a final chunk of data if there are remaining bytes which have not yet been output.
Notifies this object that all data has been processed. An implementation can yield a final chunk of data if there are remaining bytes which have not yet been output.
Initializes this object for the current operation. This function is called with the first chunk of data to be processed and some helper objects typically required to correctly initialize a crypt operation.
Initializes this object for the current operation. This function is called with the first chunk of data to be processed and some helper objects typically required to correctly initialize a crypt operation.
Transforms the given chunk of data. This function is called repeatedly for all the data chunks to be transformed except for the first one (which is handled by ''init()''. Here the actual encryption/decryption work takes place.
Transforms the given chunk of data. This function is called repeatedly for all the data chunks to be transformed except for the first one (which is handled by ''init()''. Here the actual encryption/decryption work takes place.