summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-11-20 10:10:07 +0200
committerLars Wirzenius <liw@liw.fi>2021-11-20 10:10:07 +0200
commit7ff672f26e91404b71edfc25d6b27a6cda11609b (patch)
tree8553fcc1f6c108a24826bfa996ae52a1da7421ff
parente9e3f3412e4cc4db25bb9e6d8753f1dcb84520b6 (diff)
downloadobnam2-7ff672f26e91404b71edfc25d6b27a6cda11609b.tar.gz
chore: update dependency on pbkdf2 to 0.9 and fix breakage
Sponsored-by: author
-rw-r--r--Cargo.lock13
-rw-r--r--Cargo.toml2
-rw-r--r--src/passwords.rs2
3 files changed, 8 insertions, 9 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 700265c..256d3d4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -103,9 +103,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "base64ct"
-version = "1.2.0"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "392c772b012d685a640cdad68a5a21f4a45e696f85a2c2c907aab2fe49a91e19"
+checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b"
[[package]]
name = "bitflags"
@@ -1070,9 +1070,9 @@ dependencies = [
[[package]]
name = "password-hash"
-version = "0.2.3"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77e0b28ace46c5a396546bcf443bf422b57049617433d8854227352a4a9b24e7"
+checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8"
dependencies = [
"base64ct",
"rand_core",
@@ -1081,11 +1081,10 @@ dependencies = [
[[package]]
name = "pbkdf2"
-version = "0.8.0"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
+checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739"
dependencies = [
- "base64ct",
"crypto-mac",
"hmac",
"password-hash",
diff --git a/Cargo.toml b/Cargo.toml
index dbd062b..daedd4a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ indicatif = "0.16"
libc = "0.2"
log = "0.4"
log4rs = "1"
-pbkdf2 = "0.8"
+pbkdf2 = "0.9"
pretty_env_logger = "0.4"
rand = "0.8"
reqwest = { version = "0.11", features = ["blocking", "json"]}
diff --git a/src/passwords.rs b/src/passwords.rs
index a1cf42e..bc1a1d7 100644
--- a/src/passwords.rs
+++ b/src/passwords.rs
@@ -70,7 +70,7 @@ fn derive_password(passphrase: &str) -> String {
let salt = SaltString::generate(&mut OsRng);
Pbkdf2
- .hash_password_simple(passphrase.as_bytes(), salt.as_ref())
+ .hash_password(passphrase.as_bytes(), salt.as_ref())
.unwrap()
.to_string()
}