sosecrets-rs
sosecrets-rs copied to clipboard
A simple `Secret` wrapper type that reveals the secret at most `N: typenum::Unsigned` (i.e. unsigned integer) times with compile time guarantees and exposure of secrets are strictly controlled in its...
runtime Secret(T, sync::atomic::AtomicUsize, usize) then can count at runtime instead of compile time
(in pseudocode) ``` #![cfg(feature = "serializable-secret")] ... Secret.serialize_secret(ec: EC) -> SerializableSecret ``` Then `impl serde::Serialize for SerializableSecret`. The advantages are: 1. Feature-gated. 2. Even if feature is enabled, user of...