public interface StreamSegmentDecrypter
Instances of this interfaces are passed to StreamingAeadDecryptingChannel. Each
instance must be initialized with the header of the ciphertext.
| Modifier and Type | Method and Description |
|---|---|
void |
decryptSegment(ByteBuffer ciphertext,
int segmentNr,
boolean isLastSegment,
ByteBuffer plaintext)
Decrypts a ciphetext segment.
|
void |
init(ByteBuffer header,
byte[] aad) |
void init(ByteBuffer header, byte[] aad) throws GeneralSecurityException
GeneralSecurityExceptionvoid decryptSegment(ByteBuffer ciphertext, int segmentNr, boolean isLastSegment, ByteBuffer plaintext) throws GeneralSecurityException
segmentNr - the number of the segmentisLastSegment - true if this segment is the last segment of the ciphertext stream. The
last segment is encrypted (or authenticated) differently to detect truncated ciphertext.plaintext - the decrypted plaintext.GeneralSecurityException - if ciphertext was not a valid ciphertext for the given
segment.