Package org.bouncycastle.crypto.general
Class AES.OperatorFactory
- java.lang.Object
-
- org.bouncycastle.crypto.general.AES.OperatorFactory
-
- All Implemented Interfaces:
SymmetricOperatorFactory<AES.Parameters>
- Enclosing class:
- AES
public static final class AES.OperatorFactory extends java.lang.Object
Factory for basic non-FIPS AES encryption/decryption operators.
-
-
Constructor Summary
Constructors Constructor Description OperatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BufferedBlockCipher
createCipher(boolean forEncryption, SymmetricKey key, AES.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, AES.Parameters parameters, java.security.SecureRandom random)
-
createOutputEncryptor
public final OutputEncryptor<T> createOutputEncryptor(SymmetricKey key, T 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<T> createOutputDecryptor(SymmetricKey key, T 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<T> createInputDecryptor(SymmetricKey key, T 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.
-
-