[][src]Constant sequoia_openpgp::parse::stream::DEFAULT_BUFFER_SIZE

pub const DEFAULT_BUFFER_SIZE: usize

How much data to buffer before giving it to the caller.

Signature verification and detection of ciphertext tampering requires processing the whole message first. Therefore, OpenPGP implementations supporting streaming operations necessarily must output unverified data. This has been a source of problems in the past. To alleviate this, we buffer the message first (up to 25 megabytes of net message data by default), and verify the signatures if the message fits into our buffer. Nevertheless it is important to treat the data as unverified and untrustworthy until you have seen a positive verification.

The default can be changed using VerifierBuilder::buffer_size and DecryptorBuilder::buffer_size.