com.eruces.teagent.TECipherOutputStream
The TECipherOutputStream class is a cipher output stream that also carries the TTag of the key its cipher was built from.
Since: 1.0
© Pi Soft, 2018-2026 · Tricryption Engine 8.1
Inheritance
- Inherits CipherOutputStream
Public Member Functions
| Member | Description |
|---|---|
TECipherOutputStream(OutputStream os, Cipher c, byte[] ttag) | Constructs a Tricryption encryption output stream. |
TECipherOutputStream(OutputStream os, TECipher c) | Constructs a Tricryption cipher encryption stream. |
void close() | Closes output stream. |
void flush() | Flushes cipher output stream Note: Do not flush until the the end of output stream. |
void write(byte[] b) | Writes b.length bytes to cipher output stream. |
void write(byte[] b, int off, int len) | Writes data to cipher output stream. |
void write(int b) | Writes the specified byte to output stream. |
Member Function Documentation
TECipherOutputStream(OutputStream os, Cipher c, byte[] ttag)
Constructs a Tricryption encryption output stream.
Parameters
| Parameter | Description |
|---|---|
os | output stream |
c | a fully initialized cipher object. The cipher object can be constructed with Eruces JCE provider. |
ttag | T-tag of the secret key used to construct cipher object |
TECipherOutputStream(OutputStream os, TECipher c)
Constructs a Tricryption cipher encryption stream.
Parameters
| Parameter | Description |
|---|---|
os | output stream |
c | a Tricryption cipher object |
Exceptions
| Exception | Description |
|---|---|
TEAgentException | if the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException). |
void close()
Closes output stream.
Exceptions
| Exception | Description |
|---|---|
IOException | if the underlying stream cannot be written or closed. |
void flush()
Flushes cipher output stream Note: Do not flush until the the end of output stream.
Exceptions
| Exception | Description |
|---|---|
IOException | if the underlying stream cannot be written or closed. |
void write(byte[] b)
Writes b.length bytes to cipher output stream.
Parameters
| Parameter | Description |
|---|---|
b | the input buffer |
Exceptions
| Exception | Description |
|---|---|
IOException | if the underlying stream cannot be written or closed. |
void write(byte[] b, int off, int len)
Writes data to cipher output stream.
Parameters
| Parameter | Description |
|---|---|
b | the input buffer |
off | the offset in b where the input starts |
len | the input length |
Exceptions
| Exception | Description |
|---|---|
IOException | if the underlying stream cannot be written or closed. |
void write(int b)
Writes the specified byte to output stream.
Parameters
| Parameter | Description |
|---|---|
b | the byte |
Exceptions
| Exception | Description |
|---|---|
IOException | if the underlying stream cannot be written or closed. |