public interface InputStreamCipherEngine extends CipherEngine
EncryptedContentInfoStream
for content en/decryption.
Setups a cipher utility for encryption/decryption depending on the requested mode and
en/deciphers the data that is supplied by an input stream when calling method cipher
.
Allows the implementation of en/deciphering utilities that may be independent from the JCE
javax.crypto.Cipher
engine. The default implementation, however, is based on the
javax.crypto.Cipher
engine and uses a CipherInputStream
for
en/decrypting the data that is read by the stream.
An application that implements its own InputStreamCipherEngine has to override the following
SecurityProvider
methods to plug-in its own implementation:
SecurityProvider
CIPHER_DECRYPT, CIPHER_ENCRYPT, CIPHER_NONE, CIPHER_UNWRAP, CIPHER_WRAP
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
cipher(java.io.InputStream is,
int blockSize)
Gets an input stream that en/decrypts all data that is read from the
underlying input stream.
|
getParameters, initCipher, initCipher, setSecurityProvider
java.io.InputStream cipher(java.io.InputStream is, int blockSize)
is
- the input stream that supplies the data to be en/decryptedblockSize
- the number of bytes that shall be processed at once (for
block based data processing; only blockSize
bytes are hold in memory at once)