public class OutputStreamAesGcmEncryption extends OutputStreamEncryption
OutputStreamEncryption instance.out| Constructor and Description |
|---|
OutputStreamAesGcmEncryption(OutputStream out,
byte[] key,
byte[] noncePart)
Creates a new instance of
OutputStreamAesGcmEncryption. |
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Finishes and dispose all resources used for writing in encrypted stream.
|
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the specified byte array
starting at offset off to this output stream. |
close, flush, write, writepublic OutputStreamAesGcmEncryption(OutputStream out, byte[] key, byte[] noncePart)
OutputStreamAesGcmEncryption.out - the OutputStream instance to be used as the destination for the encrypted contentkey - the byte array containing the key for encryptionnoncePart - a 7 byte noncepublic void write(byte[] b,
int off,
int len)
throws IOException
len bytes from the specified byte array
starting at offset off to this output stream.
The general contract for write(b, off, len) is that
some bytes in the array b are written to the
output stream in order; element b[off] is the first
byte written and b[off+len-1] is the last byte written
by this operation.
The write method of OutputStream calls
the write method of one argument on each of the bytes to be
written out. Subclasses are encouraged to override this method and
provide a more efficient implementation.
If off is negative, or len is negative, or
off+len is greater than the length of the array
b, then an IndexOutOfBoundsException is thrown.
write in class OutputStreamEncryptionb - the dataoff - the start offset in the datalen - the number of bytes to writeIOException - if an I/O error occurs. In particular,
an IOException is thrown if the output
stream is closedpublic void finish()
finish in class OutputStreamEncryptionCopyright © 1998–2024 Apryse Group NV. All rights reserved.