pub fn encoded_len(
    label: &str,
    line_ending: LineEnding,
    input: &[u8]
) -> Result<usize, Error>
Available on crate feature pkcs8 only.
Expand description

Get the length of a PEM encoded document with the given bytes and label.

This function computes a precise length of the PEM encoding of the given input data.

§Returns

  • Ok(len) on success
  • Err(Error::Length) on length overflow