Expand description
DNT authenticated encrypted binary container.
DNT is payload-agnostic. The file extension is never trusted as format identity; callers inspect and verify the authenticated binary header.
Structs§
- Bytes
Codec - Identity codec for arbitrary binary payloads.
- CodecId
- Payload codec identifier stored in the authenticated header.
- Content
Type - Logical payload content type stored in the authenticated header.
- DntContext
- DNT context bound to key resolution and authenticated header validation.
- DntFlags
- Validated DNT flags.
- DntHeader
- Structurally parsed DNT header.
- DntOpen
Options - Options used when opening or verifying an envelope.
- DntSeal
Options - Options used when sealing a payload.
- Identity
Json Codec - Identity codec for caller-validated JSON bytes.
- KeyId
- Rotation-aware key identifier stored in the authenticated header.
- Opened
Dnt - Authenticated and decoded DNT content.
- Secret
Key - Symmetric 256-bit AEAD key material.
- Static
DntKey Provider - Deterministic in-memory provider for tests and development-only adapters.
- Verified
Dnt - Result of cryptographic verification without returning plaintext.
Enums§
- Codec
Error - Controlled codec failures.
- DntAlgorithm
- Authenticated encryption algorithm used by this envelope.
- DntCompression
- Payload storage transform recorded in the authenticated DNT header.
- DntError
- Controlled DNT failures.
- DntKey
Error - Controlled key-provider failures.
Constants§
- DNT_
CONTENT_ BACKUP - AppCore backup content type.
- DNT_
CONTENT_ JSON - Conventional JSON content type.
- DNT_
CONTENT_ OCTET_ STREAM - Conventional arbitrary bytes content type.
- DNT_
CONTENT_ SECRET - AppCore secret material content type.
- DNT_
CONTENT_ SNAPSHOT - AppCore snapshot content type.
- DNT_
CONTENT_ SYNC_ EVENT - AppCore sync event content type.
- DNT_
ENVELOPE_ VERSION_ V1 - Current DNT envelope version.
- DNT_
FLAG_ PAYLOAD_ DEFLATE - Internal DNT flag: stored encoded payload uses zlib-wrapped DEFLATE.
- DNT_
INTERNAL_ FLAG_ MASK - Bits reserved for DNT envelope semantics.
- DNT_
MAGIC - DNT magic bytes. File extensions are conventions only.
- DNT_
MAX_ ENCRYPTED_ METADATA_ BYTES - Maximum encrypted metadata accepted by the in-memory V1 envelope.
- DNT_
MAX_ HEADER_ BYTES - Maximum accepted header size.
- DNT_
USER_ FLAG_ COUNT - Number of user flag bits available to callers.
- DNT_
USER_ FLAG_ MASK - Bits available for caller/application semantics.
- DNT_
USER_ FLAG_ OFFSET - First user flag bit in the raw DNT flag field.
Traits§
- DntCodec
- Payload codec used before encryption and after authentication.
- DntKey
Provider - Resolves DNT encryption keys by identity and authenticated context.
Functions§
- dnt_
compose_ flags - Combines DNT-owned internal flags and caller-owned user flags.
- dnt_
user_ flag - Creates a caller-owned user flag by relative index
0..16. - inspect_
header - Structurally inspects a DNT header without resolving keys or decrypting.
- migrate_
envelope - Migrates an envelope by opening and resealing it with the current writer.
- open
- Opens, authenticates and decodes a complete DNT envelope.
- open_
owned - Opens an owned envelope, allowing in-place decryption of the file buffer.
- read_
verified - Reads, authenticates and opens one DNT file.
- rekey
- Opens and seals the same semantic payload under a new key identifier.
- seal
- Seals arbitrary bytes into a DNT envelope.
- verify
- Cryptographically verifies a DNT envelope and discards plaintext.
- write_
atomic - Seals, verifies and atomically replaces one DNT file.
Type Aliases§
- DntResult
- DNT-local result type.