Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kCipherStream_FlushFinal | ( | kCipherStream | cipherStream | ) |

Flushes any pending data, adding padding if needed.

If the kStream_Flush method is called on a cipher stream object, it will flush the underlying stream to which this cipher stream is bound. However, if the number of bytes that have been written to the cipher stream is not a multiple of cipher block size, remainder bytes will not be flushed automatically.

In contrast, the kCipherStream_FlushFinal method ensures that all bytes that have been written to the cipher stream are flushed, adding padding if necessary. This is typically performed once, at the end of a stream. However, it's possible to perform this operation multiple times. It is up to the caller to remove padding bytes from decrypted output.

This function will be called automatically when the cipher stream object is destroyed.

Parameters

  cipherStream | Cipher stream object.

Returns
  Operation status.