# 2.0 Profiles And Protocol Terminology
Status: public in the `2.0.0` candidate as ordinary composition surfaces.
Commit 17 removes ambiguous 2.0 `Engine`/`Profile` duplication. Every named
value is either one `Base64<Spec>`, one validated alphabet, or one `BodyCodec`
that composes a codec with line layout. Names describe exactly those bytes and
do not imply a complete surrounding protocol implementation.
## Body Policies
| `MIME_BODY_STRICT` | strict Standard padded | 76 columns, CRLF | MIME headers, messages, transfer-encoding selection |
| `PEM_BODY_LF` | strict Standard padded | 64 columns, LF | labels, boundaries, headers, container parsing |
| `PEM_BODY_CRLF` | strict Standard padded | 64 columns, CRLF | labels, boundaries, headers, container parsing |
`BodyCodec::codec` and `BodyCodec::wrapping` expose the two immutable policies
for explicit composition. `BodyWrap` validates and copies body layout only. It
accepts no zero width, inserts no trailing line ending, and does not validate
Base64 symbols. Complete MIME and PEM parsers remain owned by Commits 43 and
44.
## Alphabet-Level Values
| `BCRYPT_ALPHABET_NO_PAD` | standard bit grouping, bcrypt alphabet, no padding | bcrypt password-record parsing or construction |
| `CRYPT_ALPHABET_NO_PAD` | standard bit grouping, `crypt(3)` alphabet, no padding | little-endian password-field transforms or record grammar |
| `PBKDF2_ALPHABET_NO_PAD` | standard alphabet with `.` replacing `+`, no padding | Passlib record grammar, salt limits, checksum limits |
| `BINHEX_ALPHABET` | validated 64-character alphabet only | padding choice, RLE, CRC, forks, or BinHex containers |
| `IMAP_MUTF7_ALPHABET_NO_PAD` | standard bit grouping with `,` replacing `/`, no padding | UTF-16BE conversion, shifted runs, delimiters, mailbox parsing |
`BINHEX_ALPHABET` deliberately requires callers to select padding through
`CodecBuilder`. The other four values name complete alphabet-level codecs,
not protocol parsers.
The PBKDF2 mapping is differentially checked against exact-pinned `base64ct` 1.8.3.
That dependency has no BinHex implementation, so BinHex and IMAP are
instead checked against exact-pinned `base64` 0.23.0 and the crate's
independent mapping tests. Commit 46 must consume the IMAP alphabet fixtures
when it adds complete modified-UTF-7 payload transforms.
## Legacy ASCII Whitespace
`legacy::ASCII_WHITESPACE` is the only retained generic legacy-whitespace
policy. It ignores exactly:
- ASCII space (`0x20`);
- horizontal tab (`0x09`);
- carriage return (`0x0d`); and
- line feed (`0x0a`).
Form feed, vertical tab, non-ASCII bytes, and every other byte remain
significant. This is intentionally different from `web::FORGIVING`, which
implements the WHATWG algorithm and also ignores form feed.
The heapless `LegacyWhitespaceDecoder` counts raw source bytes in `Progress`
and `source_position`. Detailed ordinary errors report original indexes before
compaction, including across whitespace-only chunks. Failures are absorbing;
one-shot decode validates and sizes before the first destination write.
This state derives ordinary `Debug`, does not wipe on drop, and is not exported
from `secret::*`. It must not process keys, passwords, bearer tokens, or other
secret-bearing input.
## Migration
| `MIME` | `MIME_BODY_STRICT` for body bytes; complete parser in the MIME companion |
| `PEM` | `PEM_BODY_LF` for body bytes; complete parser in the PEM companion |
| `PEM_CRLF` | `PEM_BODY_CRLF` for body bytes; complete parser in the PEM companion |
| `BCRYPT_NO_PAD`, profile `BCRYPT` | `BCRYPT_ALPHABET_NO_PAD` |
| `CRYPT_NO_PAD`, profile `CRYPT` | `CRYPT_ALPHABET_NO_PAD` |
| `decode_*_legacy` | `legacy::ASCII_WHITESPACE` with an explicit `Base64<Spec>` |
The 1.3.9 API remains frozen during development. These mappings define the
eventual 2.0 replacement and do not remove compatibility items before the
major-version cut.
## Evidence
Run the focused gate on the active compiler or MSRV:
```sh
scripts/check-2.0-profiles.sh
BASE64_NG_PROFILE_TOOLCHAIN=1.90.0 scripts/check-2.0-profiles.sh
```
The gate checks old/new behavior, all ASCII whitespace classifications,
original indexes, overflow, public migration examples, external differential
oracles, secret-module exclusion, and package documentation wording.