Skip to content

Commit

Permalink
Merge pull request #8 from Eyob94/chore/impl_cloneablesecret
Browse files Browse the repository at this point in the history
Implement CloneableSecret for String
  • Loading branch information
Eyob94 authored Sep 11, 2024
2 parents e9d5dd5 + b9a6796 commit 6c9acc0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S: Zeroize> {
/// Expose secret as non-mutable.
Expand Down

0 comments on commit 6c9acc0

Please sign in to comment.