Package org.bouncycastle.crypto.general
Class Twofish.OperatorFactory
java.lang.Object
org.bouncycastle.crypto.general.Twofish.OperatorFactory
- All Implemented Interfaces:
SymmetricOperatorFactory<Twofish.Parameters>
- Enclosing class:
- Twofish
Factory for basic Twofish encryption/decryption operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.bouncycastle.crypto.internal.BufferedBlockCipher
createCipher
(boolean forEncryption, SymmetricKey key, Twofish.Parameters parameters, SecureRandom random) final InputDecryptor<Twofish.Parameters>
createInputDecryptor
(SymmetricKey key, Twofish.Parameters parameters) Return a decryptor that operates on an input stream.createOutputDecryptor
(SymmetricKey key, Twofish.Parameters parameters) Return a decryptor that operates on an output stream.createOutputEncryptor
(SymmetricKey key, Twofish.Parameters parameters) Return an encryptor that operates on an output stream.
-
Constructor Details
-
OperatorFactory
public OperatorFactory()
-
-
Method Details
-
createCipher
protected org.bouncycastle.crypto.internal.BufferedBlockCipher createCipher(boolean forEncryption, SymmetricKey key, Twofish.Parameters parameters, SecureRandom random) -
createOutputEncryptor
public final OutputEncryptor<Twofish.Parameters> createOutputEncryptor(SymmetricKey key, Twofish.Parameters parameters) Description copied from interface:SymmetricOperatorFactory
Return an encryptor that operates on an output stream.- Specified by:
createOutputEncryptor
in 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<Twofish.Parameters> createOutputDecryptor(SymmetricKey key, Twofish.Parameters parameters) Description copied from interface:SymmetricOperatorFactory
Return a decryptor that operates on an output stream.- Specified by:
createOutputDecryptor
in 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<Twofish.Parameters> createInputDecryptor(SymmetricKey key, Twofish.Parameters parameters) Description copied from interface:SymmetricOperatorFactory
Return a decryptor that operates on an input stream.- Specified by:
createInputDecryptor
in 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.
-