Expand description
Streaming encryption for large content.
This module provides chunk-by-chunk encryption/decryption for processing large files without loading them entirely into memory.
Structs§
- Stream
Decryptor - Streaming decryptor for large content.
- Stream
Encryptor - Streaming encryptor for large content.
Enums§
- Stream
Error - Streaming encryption error.
Constants§
- AUTH_
TAG_ SIZE - Authentication tag size (16 bytes for Poly1305).
- STREAM_
CHUNK_ SIZE - Default chunk size for streaming (256 KB).
Functions§
- chunk_
count - Calculate the number of chunks for a given data size.
- decrypt_
chunked - Decrypt encrypted chunks back into the original buffer.
- encrypt_
chunked - Encrypt an entire buffer in chunks, returning all encrypted chunks.
- encrypted_
chunk_ size - Calculate the encrypted size of a chunk (plaintext + auth tag).