1#![deny(missing_docs)]
17
18mod cipher;
19mod codec;
20mod compression;
21mod crypto;
22mod error;
23mod flags;
24mod header;
25mod ids;
26mod io;
27mod migration;
28mod model;
29mod model_types;
30mod plaintext;
31
32pub use codec::{BytesCodec, DntCodec, IdentityJsonCodec};
33pub use compression::DntCompression;
34pub use crypto::{DntKeyProvider, SecretKey, StaticDntKeyProvider};
35pub use error::{CodecError, DntError, DntKeyError, DntResult};
36pub use flags::{
37 dnt_compose_flags, dnt_user_flag, DntFlags, DNT_FLAG_PAYLOAD_DEFLATE, DNT_INTERNAL_FLAG_MASK,
38 DNT_USER_FLAG_COUNT, DNT_USER_FLAG_MASK, DNT_USER_FLAG_OFFSET,
39};
40pub use header::{
41 inspect_header, DntAlgorithm, DntHeader, DNT_CONTENT_BACKUP, DNT_CONTENT_JSON,
42 DNT_CONTENT_OCTET_STREAM, DNT_CONTENT_SECRET, DNT_CONTENT_SNAPSHOT, DNT_CONTENT_SYNC_EVENT,
43 DNT_ENVELOPE_VERSION_V1, DNT_MAGIC, DNT_MAX_ENCRYPTED_METADATA_BYTES, DNT_MAX_HEADER_BYTES,
44};
45pub use ids::{CodecId, ContentType, KeyId};
46pub use io::{read_verified, write_atomic};
47pub use migration::{migrate_envelope, rekey};
48pub use model::{open, open_owned, seal, verify};
49pub use model_types::{DntContext, DntOpenOptions, DntSealOptions, OpenedDnt, VerifiedDnt};
50
51#[cfg(test)]
52mod tests;