public class CipherFactory
extends java.lang.Object
Constructor and Description |
---|
CipherFactory() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
createContentCipher(boolean forEncryption,
CipherParameters encKey,
AlgorithmIdentifier encryptionAlgID)
Create a content cipher for encrypting bulk data.
|
static CipherOutputStream |
createOutputStream(java.io.OutputStream dOut,
java.lang.Object cipher)
Return a new CipherOutputStream based on the passed in cipher.
|
public static java.lang.Object createContentCipher(boolean forEncryption, CipherParameters encKey, AlgorithmIdentifier encryptionAlgID) throws java.lang.IllegalArgumentException
forEncryption
- true if the cipher is for encryption, false otherwise.encKey
- the basic key to use.encryptionAlgID
- identifying algorithm OID and parameters to use.java.lang.IllegalArgumentException
public static CipherOutputStream createOutputStream(java.io.OutputStream dOut, java.lang.Object cipher)
dOut
- the output stream to write the processed data to.cipher
- the cipher to use.