Skip to content

Commit 27e2840

Browse files
authored
Bump password-hash to v0.6.0-rc.3 (#757)
Also fixes deprecations
1 parent f349989 commit 27e2840

File tree

12 files changed

+25
-24
lines changed

12 files changed

+25
-24
lines changed

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ exclude = ["benches", "fuzz"]
1515

1616
[profile.dev]
1717
opt-level = 2
18-
19-
[patch.crates-io.password-hash]
20-
git = "https://github.com/RustCrypto/traits"

argon2/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ blake2 = { version = "0.11.0-rc.3", default-features = false }
2222

2323
# optional dependencies
2424
rayon = { version = "1.7", optional = true }
25-
password-hash = { version = "0.6.0-rc.2", optional = true }
25+
password-hash = { version = "0.6.0-rc.3", optional = true }
2626
zeroize = { version = "1", default-features = false, optional = true }
2727

2828
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
2929
cpufeatures = "0.2.17"
3030

3131
[dev-dependencies]
3232
hex-literal = "1"
33-
password-hash = { version = "0.6.0-rc.2", features = ["rand_core"] }
33+
password-hash = { version = "0.6.0-rc.3", features = ["rand_core"] }
3434

3535
[features]
3636
default = ["alloc", "password-hash", "rand"]

argon2/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@
7373
)]
7474
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
7575
//! use argon2::{
76-
//! password_hash::{PasswordHash, PasswordHasher, PasswordVerifier, phc::Salt},
76+
//! password_hash::{
77+
//! phc::{PasswordHash, Salt},
78+
//! PasswordHasher, PasswordVerifier,
79+
//! },
7780
//! Algorithm, Argon2, Params, Version
7881
//! };
7982
//!
@@ -163,7 +166,7 @@ pub use crate::{
163166
pub use {
164167
crate::algorithm::{ARGON2D_IDENT, ARGON2I_IDENT, ARGON2ID_IDENT},
165168
password_hash::{
166-
self, CustomizedPasswordHasher, PasswordHash, PasswordHasher, PasswordVerifier,
169+
self, CustomizedPasswordHasher, PasswordHasher, PasswordVerifier, phc::PasswordHash,
167170
},
168171
};
169172

argon2/src/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use core::str::FromStr;
77
#[cfg(feature = "password-hash")]
88
use {
99
core::fmt::{self, Display},
10-
password_hash::{PasswordHash, phc::ParamsString},
10+
password_hash::phc::{ParamsString, PasswordHash},
1111
};
1212

1313
/// Argon2 password hash parameters.

balloon-hash/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ crypto-bigint = { version = "0.7.0-rc.9", default-features = false, features = [
1919
rand_core = { version = "0.10.0-rc-2", default-features = false }
2020

2121
# optional dependencies
22-
password-hash = { version = "0.6.0-rc.2", default-features = false, optional = true }
22+
password-hash = { version = "0.6.0-rc.3", optional = true, default-features = false, features = ["phc"] }
2323
rayon = { version = "1.7", optional = true }
2424
zeroize = { version = "1", default-features = false, optional = true }
2525

password-auth/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rust-version = "1.85"
1818

1919
[dependencies]
2020
getrandom = { version = "0.3", default-features = false }
21-
password-hash = { version = "0.6.0-rc.2", features = ["alloc", "getrandom"] }
21+
password-hash = { version = "0.6.0-rc.3", features = ["alloc", "getrandom"] }
2222

2323
# optional dependencies
2424
argon2 = { version = "0.6.0-rc.0", optional = true, default-features = false, features = ["alloc", "simple"], path = "../argon2" }

pbkdf2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust-version = "1.85"
1717
digest = { version = "0.11.0-rc.4", features = ["mac"] }
1818

1919
# optional dependencies
20-
password-hash = { version = "0.6.0-rc.2", default-features = false, optional = true, features = ["rand_core"] }
20+
password-hash = { version = "0.6.0-rc.3", default-features = false, optional = true, features = ["phc", "rand_core"] }
2121
hmac = { version = "0.13.0-rc.3", default-features = false, optional = true }
2222
sha1 = { version = "0.11.0-rc.3", default-features = false, optional = true }
2323
sha2 = { version = "0.11.0-rc.3", default-features = false, optional = true }

scrypt/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ sha2 = { version = "0.11.0-rc.3", default-features = false }
2020
rayon = { version = "1.11", optional = true }
2121

2222
# optional dependencies
23-
password-hash = { version = "0.6.0-rc.2", default-features = false, features = ["rand_core"], optional = true }
23+
password-hash = { version = "0.6.0-rc.3", default-features = false, features = ["phc", "rand_core"], optional = true }
2424

2525
[dev-dependencies]
26-
password-hash = { version = "0.6.0-rc.2", features = ["rand_core"] }
26+
password-hash = { version = "0.6.0-rc.3", features = ["rand_core"] }
2727

2828
[features]
2929
default = ["simple", "rayon"]
30-
simple = ["password-hash"]
3130
rayon = ["dep:rayon"]
31+
simple = ["dep:password-hash"]
3232

3333
[package.metadata.docs.rs]
3434
all-features = true

scrypt/src/params.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct Params {
2222
pub(crate) log_n: u8,
2323
pub(crate) r: u32,
2424
pub(crate) p: u32,
25-
#[cfg(feature = "password-hash")]
25+
#[cfg(feature = "simple")]
2626
pub(crate) len: Option<usize>,
2727
}
2828

@@ -49,7 +49,7 @@ impl Params {
4949
log_n: Self::RECOMMENDED_LOG_N,
5050
r: Self::RECOMMENDED_R,
5151
p: Self::RECOMMENDED_P,
52-
#[cfg(feature = "password-hash")]
52+
#[cfg(feature = "simple")]
5353
len: None,
5454
};
5555

@@ -105,7 +105,7 @@ impl Params {
105105
log_n,
106106
r: r as u32,
107107
p: p as u32,
108-
#[cfg(feature = "password-hash")]
108+
#[cfg(feature = "simple")]
109109
len: None,
110110
})
111111
}
@@ -119,7 +119,7 @@ impl Params {
119119
/// The allowed values for `len` are between 10 bytes (80 bits) and 64 bytes inclusive.
120120
/// These lengths come from the [PHC string format specification](https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md)
121121
/// because they are intended for use with password hash strings.
122-
#[cfg(feature = "password-hash")]
122+
#[cfg(feature = "simple")]
123123
pub fn new_with_output_len(
124124
log_n: u8,
125125
r: u32,
@@ -193,7 +193,7 @@ impl FromStr for Params {
193193
}
194194
}
195195

196-
#[cfg(feature = "password-hash")]
196+
#[cfg(feature = "simple")]
197197
impl TryFrom<&ParamsString> for Params {
198198
type Error = Error;
199199

0 commit comments

Comments
 (0)