gopenpgp
gopenpgp copied to clipboard
Allow passing a message size hint
trafficstars
Also, set the AEAD chunk size to twice the message size hint (or the actual message size, when known), so that we don't generate an overly large chunk size when the message could fit in a smaller chunk size.
This is useful to reduce the memory usage when en/decrypting AEAD message once https://github.com/ProtonMail/go-crypto/pull/259 is merged.