Base64 Padded (PH)
Base64 Padded denotes the standard Base64 variant that strictly keeps its = padding characters, so the output length is always a multiple of 4.
Purpose
It guarantees correct recovery of the original length in protocols that require strict length alignment (such as MIME and PEM).
Mechanism
It follows the RFC 4648 3-to-4 mapping; a final short group of fewer than 3 bytes is padded with 1 or 2 = characters to the 4-character boundary, and decoders truncate according to the padding count.
Use cases
- MIME attachment transport
- PEM certificate encoding
- Protocols requiring strict length alignment