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