Package org.bouncycastle.crypto.general
Class DES.OperatorFactory
- java.lang.Object
-
- org.bouncycastle.crypto.general.DES.OperatorFactory
-
- All Implemented Interfaces:
SymmetricOperatorFactory<DES.Parameters>
- Enclosing class:
- DES
public static final class DES.OperatorFactory extends java.lang.ObjectFactory for basic DES encryption/decryption operators.
-
-
Constructor Summary
Constructors Constructor Description OperatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BufferedBlockCiphercreateCipher(boolean forEncryption, SymmetricKey key, DES.Parameters parameters, java.security.SecureRandom random)InputDecryptor<T>createInputDecryptor(SymmetricKey key, T parameters)Return a decryptor that operates on an input stream.OutputDecryptor<T>createOutputDecryptor(SymmetricKey key, T parameters)Return a decryptor that operates on an output stream.OutputEncryptor<T>createOutputEncryptor(SymmetricKey key, T parameters)Return an encryptor that operates on an output stream.
-
-
-
Method Detail
-
createCipher
protected BufferedBlockCipher createCipher(boolean forEncryption, SymmetricKey key, DES.Parameters parameters, java.security.SecureRandom random)
-
createOutputEncryptor
public final OutputEncryptor<T> createOutputEncryptor(SymmetricKey key, T parameters)
Description copied from interface:SymmetricOperatorFactoryReturn an encryptor that operates on an output stream.- Specified by:
createOutputEncryptorin interfaceSymmetricOperatorFactory<T extends Parameters>- Parameters:
key- the key to initialize the encryptor with.parameters- the parameters to use to initialize the encryptor.- Returns:
- an OutputEncryptor
-
createOutputDecryptor
public OutputDecryptor<T> createOutputDecryptor(SymmetricKey key, T parameters)
Description copied from interface:SymmetricOperatorFactoryReturn a decryptor that operates on an output stream.- Specified by:
createOutputDecryptorin interfaceSymmetricOperatorFactory<T extends Parameters>- Parameters:
key- the key to initialize the encryptor with.parameters- the parameters to use to initialize the encryptor.- Returns:
- an OutputDecryptor.
-
createInputDecryptor
public final InputDecryptor<T> createInputDecryptor(SymmetricKey key, T parameters)
Description copied from interface:SymmetricOperatorFactoryReturn a decryptor that operates on an input stream.- Specified by:
createInputDecryptorin interfaceSymmetricOperatorFactory<T extends Parameters>- Parameters:
key- the key to initialize the encryptor with.parameters- the parameters to use to initialize the encryptor.- Returns:
- an InputDecryptor.
-
-