Class CryptoOutputStream

java.lang.Object
java.io.OutputStream
org.apache.commons.crypto.stream.CryptoOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, Channel, WritableByteChannel
Direct Known Subclasses:
CtrCryptoOutputStream

public class CryptoOutputStream extends OutputStream implements WritableByteChannel
CryptoOutputStream encrypts data and writes to the under layer output. It supports any mode of operations such as AES CBC/CTR/GCM mode in concept. It is not thread-safe.

This class should only be used with blocking sinks. Using this class to wrap a non-blocking sink may lead to high CPU usage.