1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Core library behind [sefy](https://github.com/lacodda/sefy): a personal
//! secret store that lives in one unremarkable file.
//!
//! A vault is a SQLite database sealed whole with XChaCha20-Poly1305 under a
//! key derived from a master password with Argon2id. The file on disk is
//! `salt ‖ nonce ‖ ciphertext` — no magic bytes, no header, no extension
//! convention, nothing to mark it as a secret store.
//!
//! # Threat model
//!
//! sefy is **inconspicuous, not deniable**. It hides secrets from a passing
//! glance, a curious file listing and a cloud-side scanner looking for known
//! formats. It does not claim to withstand forensic analysis — a
//! high-entropy headerless file is recognizable as *some* container to an
//! examiner — nor to protect anyone compelled to give up a password.
//!
//! # Example
//!
//! ```
//! use sefy_core::{ItemKind, NewItem, Payload, Query, Vault};
//! # let directory = tempfile::tempdir().unwrap();
//! # let path = directory.path().join("notes.bak");
//!
//! let mut vault = Vault::create(&path, b"master password")?;
//! let id = vault.add(
//! NewItem::new("bank", Payload::Note { text: "vault code 1234".into() })
//! .with_tags(["money"]),
//! )?;
//! vault.save()?;
//!
//! let reopened = Vault::open(&path, b"master password")?;
//! let found = reopened.search(&Query::all().text("bank").kind(ItemKind::Note))?;
//! assert_eq!(found[0].id, id);
//! # Ok::<(), sefy_core::Error>(())
//! ```
pub use ;
pub use ;
pub use FORMAT_VERSION;
pub use ;
pub use ;
pub use Vault;