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