bc-java
bc-java copied to clipboard
OpenPGP - Partial length encoding: Enforce minimum length of the first chunk
The OpenPGP specification mandates that if partial body encoding is used, the first chunk must be at least 512 bytes long. Currently, BC does not enforce this requirement (see https://tests.sequoia-pgp.org/#Tests_support_for_partial_body_encoding )
This PR adds a check for this requirement, which will throw an IOException
for malformed packets.