Factory for creating Ciphers based on the crypto key and configuration
specified in the constructor.
Each invocation of createCipher()
will produce a new, identical
Cipher object. Each returned Cipher will encrypt data with
@Deprecated public class CipherFactory extends Object
Constructor and Description |
---|
CipherFactory(SecretKey symmetricKey,
int cipherMode,
byte[] initVectorBytes,
Provider cryptoProvider)
Deprecated.
Creates a new CipherFactory that will produce ciphers using the specified
key, mode, IV and provider.
|
Modifier and Type | Method and Description |
---|---|
Cipher |
createCipher()
Deprecated.
Creates a new Cipher instance based on the crypto parameters specified in
the constructor.
|
int |
getCipherMode()
Deprecated.
|
Provider |
getCryptoProvider()
Deprecated.
|
byte[] |
getIV()
Deprecated.
|
public CipherFactory(SecretKey symmetricKey, int cipherMode, byte[] initVectorBytes, Provider cryptoProvider)
symmetricKey
- The symmetric key used in the ciphers created by this factory.cipherMode
- The mode indicating whether the created ciphers are for
encrypting or decrypting.initVectorBytes
- The optional crypto IV used to initialize the ciphers.cryptoProvider
- The optional Java crypto provider implementation, if an
alternate crypto provider is to be used.public Cipher createCipher()
public Provider getCryptoProvider()
public int getCipherMode()
public byte[] getIV()
Copyright © 2014. All rights reserved.