Skip to content

Commit

Permalink
add clone trait
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-bozin-org committed May 22, 2024
1 parent 4d59026 commit 4cec858
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.1

Add Clone trait to EncryptionData and PasswordEncryptor

# 1.1.0

Encryption data is now &str instead of String.
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 = "password-encryptor"
version = "1.1.0"
version = "1.1.1"
edition = "2021"
description = "A helper crate for encrypting and validating password"
license = "MIT"
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ use error::{Error, Result};
use hmac::{Hmac, Mac};
use sha2::Sha512;


#[derive(Clone)]
pub struct EncryptionData<'a> {
pub content: &'a str,
pub salt: &'a str,
}

#[derive(Clone)]
pub struct PasswordEncryptor<'a> {
key: &'a [u8],
encryption_prefix: Option<&'a str>,
Expand Down

0 comments on commit 4cec858

Please sign in to comment.