Package org.bouncycastle.crypto.general
Class ChaCha20.AEADOperatorFactory
java.lang.Object
org.bouncycastle.crypto.general.ChaCha20.AEADOperatorFactory
- All Implemented Interfaces:
AEADOperatorFactory<ChaCha20.AuthParameters>
- Enclosing class:
- ChaCha20
Factory for ChaCha20-Poly1305 encryption/decryption operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.bouncycastle.crypto.internal.modes.AEADCipher
createAEADCipher
(boolean forEncryption, SymmetricKey key, ChaCha20.AuthParameters parameters) createInputAEADDecryptor
(SymmetricKey key, ChaCha20.AuthParameters parameters) Create an object for decrypting input and handling AAD data.createOutputAEADDecryptor
(SymmetricKey key, ChaCha20.AuthParameters parameters) Create an object for decrypting output and handling AAD data.createOutputAEADEncryptor
(SymmetricKey key, ChaCha20.AuthParameters parameters) Create an object for encrypting output and handling AAD data.
-
Constructor Details
-
AEADOperatorFactory
public AEADOperatorFactory()
-
-
Method Details
-
createAEADCipher
protected org.bouncycastle.crypto.internal.modes.AEADCipher createAEADCipher(boolean forEncryption, SymmetricKey key, ChaCha20.AuthParameters parameters) -
createOutputAEADEncryptor
public OutputAEADEncryptor<ChaCha20.AuthParameters> createOutputAEADEncryptor(SymmetricKey key, ChaCha20.AuthParameters parameters) Description copied from interface:AEADOperatorFactory
Create an object for encrypting output and handling AAD data.- Specified by:
createOutputAEADEncryptor
in interfaceAEADOperatorFactory<T extends Parameters>
- Parameters:
key
- the key to use to set up the encryptor.parameters
- any additional parameters required to set up the encryptor.- Returns:
- an AEAD encryptor which can be used wrap an output stream.
-
createInputAEADDecryptor
public InputAEADDecryptor<ChaCha20.AuthParameters> createInputAEADDecryptor(SymmetricKey key, ChaCha20.AuthParameters parameters) Description copied from interface:AEADOperatorFactory
Create an object for decrypting input and handling AAD data.- Specified by:
createInputAEADDecryptor
in interfaceAEADOperatorFactory<T extends Parameters>
- Parameters:
key
- the key to use to set up the decryptor.parameters
- any additional parameters required to set up the decryptor.- Returns:
- an AEAD decryptor which can be used wrap an input stream.
-
createOutputAEADDecryptor
public OutputAEADDecryptor<ChaCha20.AuthParameters> createOutputAEADDecryptor(SymmetricKey key, ChaCha20.AuthParameters parameters) Description copied from interface:AEADOperatorFactory
Create an object for decrypting output and handling AAD data.- Specified by:
createOutputAEADDecryptor
in interfaceAEADOperatorFactory<T extends Parameters>
- Parameters:
key
- the key to use to set up the decryptor.parameters
- any additional parameters required to set up the decryptor.- Returns:
- an AEAD decryptor which can be used wrap an output stream.
-