Configure tokenization
DFTOKENv prefix. Tokenization rejects malformed or unsupported pre-existing token envelopes before calling a provider, ensuring it cannot produce output that restoration cannot parse. Header parsing bounds version and length fields to 20 digits.
Provider contract
A token provider implements two asynchronous batch methods:tokenize_batch(scope, items)/tokenizeBatch(scope, items)restore_batch(scope, items)/restoreBatch(scope, items)
id, the exact_value, and
the configured token_ref. Return the same id, opaque payload bytes, and a
concrete resolved profile version.
Each restoration item contains an id, token_ref, resolved version, and
opaque payload. Return the same id and restored value.
Python round trip
Node.js round trip
Atomic and non-recursive behavior
- Repeated source values are separate tokenization items and may receive different tokens.
- Identical envelopes are deduplicated before restoration provider calls.
- Every canonical token in the supplied text is restored, or no result is returned.
- Nested tokenization and recursive restoration are rejected.
- Partial restoration and ignore-failure modes are not available.
DFTOKENv1(<body-length>):<ref>.<version>.<payload> form with unpadded
Base64URL components. Treat the envelope as opaque application data; do not
parse or construct it yourself.
Browser/WASM rejects provider-backed tokenization and restoration with
unsupported_strategy. Use a browser Workspace to restore its locally issued markers.