/** * Constructs a CipherInputStream from an InputStream, a * BufferedBlockCipher, and a specified internal buffer size. */ public CipherInputStream( InputStream is, BufferedBlockCipher cipher, int bufSize) { super(is); this.bufferedBlockCipher = cipher; this.inBuf = new byte[bufSize]; this.skippingCipher = (cipher instanceof SkippingCipher) ? (SkippingCipher)cipher : null; }
/** * Constructs a CipherInputStream from an InputStream, a StreamCipher, and a specified internal buffer size. */ public CipherInputStream( InputStream is, StreamCipher cipher, int bufSize) { super(is); this.streamCipher = cipher; this.inBuf = new byte[bufSize]; this.skippingCipher = (cipher instanceof SkippingCipher) ? (SkippingCipher)cipher : null; }
/** * Constructs a CipherInputStream from an InputStream, an AEADBlockCipher, and a specified internal buffer size. */ public CipherInputStream( InputStream is, AEADBlockCipher cipher, int bufSize) { super(is); this.aeadBlockCipher = cipher; this.inBuf = new byte[bufSize]; this.skippingCipher = (cipher instanceof SkippingCipher) ? (SkippingCipher)cipher : null; }