pub fn legacy_password(password: &str, query: &Reader<'_>) -> Result<Plaintext>Expand description
Encode a legacy PKCS#12 password as big-endian BMP characters plus a single zero terminator (RFC7292 Appendix B.1). Supplementary Unicode scalars are refused, never encoded as surrogate pairs. PBMAC1 (RFC9879 §6) and PBES2 use the original UTF-8 bytes instead; callers must not apply this conversion merely because a different protection layer in the same PFX uses legacy PBE. https://www.rfc-editor.org/rfc/rfc7292#appendix-B.1