pub enum IntegrityMode {
Sidecar,
TrustAnchor,
}Expand description
How the tamper-evident handle enforces integrity.
Choose based on the number of files you need to protect:
-
Sidecar(default): One platform secure-store entry per app (the HMAC key). Each file gets a.hmacsidecar that IS the authoritative integrity check. Scales to any number of files. Suitable for directories with thousands of entries. -
TrustAnchor: One platform secure-store entry per app (HMAC key) plus one per protected file (the HMAC tag itself). The sidecar is a forensic cache; the platform secure store is authoritative. Deleting a sidecar cannot bypass verification. Use only for low-volume, high-value files.
Variants§
Sidecar
HMAC sidecar is the authoritative integrity check. One secure-store entry per app. Scales to any file count.
TrustAnchor
Per-file trust anchor in the platform secure store (Keychain / DPAPI / Secret Service). One secure-store entry per protected file in addition to the per-app HMAC key.
Trait Implementations§
Source§impl Clone for IntegrityMode
impl Clone for IntegrityMode
Source§fn clone(&self) -> IntegrityMode
fn clone(&self) -> IntegrityMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IntegrityMode
impl Debug for IntegrityMode
Source§impl Default for IntegrityMode
impl Default for IntegrityMode
Source§fn default() -> IntegrityMode
fn default() -> IntegrityMode
Source§impl PartialEq for IntegrityMode
impl PartialEq for IntegrityMode
Source§fn eq(&self, other: &IntegrityMode) -> bool
fn eq(&self, other: &IntegrityMode) -> bool
self and other values to be equal, and is used by ==.impl Copy for IntegrityMode
impl Eq for IntegrityMode
impl StructuralPartialEq for IntegrityMode
Auto Trait Implementations§
impl Freeze for IntegrityMode
impl RefUnwindSafe for IntegrityMode
impl Send for IntegrityMode
impl Sync for IntegrityMode
impl Unpin for IntegrityMode
impl UnsafeUnpin for IntegrityMode
impl UnwindSafe for IntegrityMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.