codec_pem/lib.rs
1// SPDX-FileCopyrightText: 2026 ReallyMe LLC
2//
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5//! PEM text armor parsing and encoding.
6//!
7//! This crate owns only the RFC 7468-style text envelope: BEGIN/END labels,
8//! base64 body, line ending normalization, size limits, and strict label
9//! matching. It deliberately does not interpret DER or cryptographic key
10//! structure.
11
12mod decode;
13mod encode;
14mod error;
15mod label;
16mod policy;
17mod types;
18
19pub use decode::decode_pem;
20pub use encode::{encode_pem, preflight_pem_encoded_length};
21pub use error::PemError;
22pub use label::PemLabel;
23pub use policy::{PemDecodePolicy, PemEncodeOptions, PemLineEnding};
24pub use types::PemDocument;