Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SecretVec #10

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Changelog

## 0.1.6 - 2024-09-11

- [#10](https://github.com/Eyob94/shush-rs/pull/10) SecretVec
- Add public alias and `SecretVec`

## 0.1.5 - 2024-09-11

- [#10](https://github.com/Eyob94/shush-rs/pull/9) FromStr
- Implement `FromStr` trait for SecretString
- Add public alias `SecretString` and `SecretVec`
- Implement `FromStr` trait for SecretString
- Add public alias `SecretString` and `SecretVec`

## 0.1.4 - 2024-09-11

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.5"
version = "0.1.6"
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
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ impl FromStr for SecretString {
}
}

/// Convenient type alias for Secret Wrapped Vectors
pub type SecretVec<T> = SecretBox<Vec<T>>;

impl<S: Zeroize> Drop for SecretBox<S> {
fn drop(&mut self) {
let len = size_of_val(&*self.inner_secret);
Expand Down
Loading