Interface InputStreamCipherEngine

All Superinterfaces:
All Known Subinterfaces:

public interface InputStreamCipherEngine
extends CipherEngine

Generic Cipher engine for encrypting/decrypting data that is supplied by an input stream. Used by class 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:

See Also:

Field Summary
Fields inherited from interface iaik.cms.CipherEngine
Method Summary
 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.
Methods inherited from interface iaik.cms.CipherEngine
getParameters, initCipher, initCipher, setSecurityProvider

Method Detail


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. The stream shall not be read by this method. This method shall only wrap a stream around the given stream. Any data that later is read from the wrapped (and thus underlying) stream is en/decrypted.

is - the input stream that supplies the data to be en/decrypted
blockSize - the number of bytes that shall be processed at once (for block based data processing; only blockSize bytes are hold in memory at once)
the en/deciphering stream

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC