From f8a0a68c1554dfa8ca27b3758a38995e26ba2f87 Mon Sep 17 00:00:00 2001 From: Eyob Date: Thu, 12 Sep 2024 00:59:21 +0300 Subject: [PATCH 1/2] Implement CloneableSecret for String --- CHANGELOG.md | 5 +++++ src/lib.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec7a947..544dbbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.1.3 - 2024-09-11 + +- [#8](https://github.com/Eyob94/shush-rs/pull/8) Impl Trait + - Implement CloneableSecret Trait for String + ## 0.1.2 - 2024-09-11 - [#7](https://github.com/Eyob94/shush-rs/pull/7) Add Changelog diff --git a/src/lib.rs b/src/lib.rs index a826e55..2006f02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -269,6 +269,8 @@ impl<'a, S: Zeroize> SecretGuardMut<'a, S> { /// Marker trait for secrets which are allowed to be cloned pub trait CloneableSecret: Clone + Zeroize {} +impl CloneableSecret for String {} + /// Create a SecretGuard that holds a reference to the secret pub trait ExposeSecret { /// Expose secret as non-mutable. From b9a6796b061eab0f8b572ff5a8ca2038a52093df Mon Sep 17 00:00:00 2001 From: Eyob Date: Thu, 12 Sep 2024 01:00:43 +0300 Subject: [PATCH 2/2] Update version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cdaf952..6909dc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shush-rs" -version = "0.1.1" +version = "0.1.3" edition = "2021" license = "MIT OR Apache-2.0" description = "A Rust crate designed to manage sensitive data securely by leveraging memory protection mechanisms."