Package org.bouncycastle.crypto
Interface OutputCipher<T extends Parameters>
- Type Parameters:
T
- the parameters type for the output cipher.
- All Known Subinterfaces:
OutputAEADDecryptor<T>
,OutputAEADEncryptor<T>
,OutputDecryptor<T>
,OutputEncryptor<T>
- All Known Implementing Classes:
FipsOutputAEADDecryptor
,FipsOutputAEADEncryptor
,FipsOutputDecryptor
,FipsOutputEncryptor
public interface OutputCipher<T extends Parameters>
Base interface for a cipher which produces encrypted/decrypted output.
-
Method Summary
Modifier and TypeMethodDescriptionint
getMaxOutputSize
(int inputLen) Return the size of the output buffer required for a write() plus a close() with the write() being passed inputLen bytes.Return the parameters for this cipher.int
getUpdateOutputSize
(int inputLen) Return the size of the output buffer required for a write() with the write() being passed inputLen bytes and just updating the cipher output.
-
Method Details
-
getParameters
T getParameters()Return the parameters for this cipher.- Returns:
- the cipher's parameters.
-
getMaxOutputSize
int getMaxOutputSize(int inputLen) Return the size of the output buffer required for a write() plus a close() with the write() being passed inputLen bytes.The returned size may be dependent on the initialisation of this cipher and may not be accurate once subsequent input data is processed as the cipher may add, add or remove padding, as it sees fit.
- Parameters:
inputLen
- the length of the input.- Returns:
- the space required to accommodate a call to processBytes and doFinal with inputLen bytes of input.
-
getUpdateOutputSize
int getUpdateOutputSize(int inputLen) Return the size of the output buffer required for a write() with the write() being passed inputLen bytes and just updating the cipher output.The returned size may be dependent on the state of this cipher.
- Parameters:
inputLen
- the length of the input.- Returns:
- the space required to accommodate a call to processBytes with inputLen bytes of input.
-