Skip to main content

probe_recipient_mode_with_limits

Function probe_recipient_mode_with_limits 

Source
pub fn probe_recipient_mode_with_limits(
    file_path: impl AsRef<Path>,
    limits: HeaderReadLimits,
) -> Result<Option<UnauthenticatedRecipientMode>, CryptoError>
Expand description

Same as probe_recipient_mode but uses the supplied HeaderReadLimits for the structural header read instead of the conservative defaults.

Use this when probing files whose recipient bodies, recipient counts, or header lengths legitimately exceed the default local caps (for example, forward-compatible files with larger future recipient bodies). All other behavior — directory short-circuit, magic-byte fast path, typed-error surface, and “not a security claim” semantics — is identical.

§Errors

Returns the same errors as probe_recipient_mode, but applies the supplied HeaderReadLimits instead of the default caps.