14 releases (7 breaking)
|0.7.0||Jul 8, 2020|
|0.6.0||Dec 12, 2019|
|0.5.2||Dec 18, 2019|
|0.5.1||Nov 30, 2019|
|0.0.0||Oct 4, 2018|
#81 in Cryptography
44,924 downloads per month
Used in 243 crates (25 directly)
A simple secret-keeping library for Rust.
secrecy is a simple, safe (i.e.
forbid(unsafe_code) library which
provides wrapper types and traits for secret management in Rust, namely the
Secret<T> type for wrapping another value in a "secret cell" which attempts
to limit exposure (only available through a special
This helps to ensure secrets aren't accidentally copied, logged, or otherwise exposed (as much as possible), and also ensures secrets are securely wiped from memory when dropped.
- Rust 1.39
serde support for parsing owned secret values is available, gated
serde cargo feature.
It uses the
DeserializeOwned traits to implement
deserializing secret types which also impl these traits.
This doesn't guarantee
serde (or code providing input to
accidentally make additional copies of the secret, but does the best it can
with what it is given and tries to minimize risk of exposure as much as
secrecy is distributed under the terms of either the MIT license or the Apache License (Version 2.0), at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.