Skip to content

Commit

Permalink
Migrate deprecated dependency crypto-mac to digest
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Apr 10, 2024
1 parent ba0a842 commit b9a83b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ hash = ["hmac", "sha-1", "sha2", "sha3"]
key = ["base32", "base64", "hex", "getrandom"]
oath = ["base32", "base64", "hash", "hex"]
oath-uri = ["oath", "url"]
pass = ["balloon-hash", "base64", "crypto-mac", "hash", "key", "nom", "pbkdf2", "rust-argon2", "unicode-normalization"]
pass = ["balloon-hash", "base64", "digest", "hash", "key", "nom", "pbkdf2", "rust-argon2", "unicode-normalization"]
stderror = ["thiserror"]

[dependencies]
balloon-hash = { version = "0.4.0", default-features = false, optional = true, features = ["alloc"] }
base32 = { version = "0.4.0", default-features = false, optional = true }
base64 = { version = "0.22.0", default-features = false, optional = true, features = ["std"] }
crypto-mac = { version = "0.11.1", default-features = false, optional = true }
digest = { version = "0.10.0", default-features = false, optional = true, features = ["mac"] }
getrandom = { version = "0.2.9", default-features = false, optional = true }
hex = { version = "0.4.3", default-features = false, optional = true, features = ["std"] }
hmac = { version = "0.12.1", default-features = false, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions src/pass/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ impl From<Error> for ErrorCode {
}
}

impl From<crypto_mac::InvalidKeyLength> for ErrorCode {
fn from(_error: crypto_mac::InvalidKeyLength) -> Self {
impl From<digest::InvalidLength> for ErrorCode {
fn from(_error: digest::InvalidLength) -> Self {
ErrorCode::InvalidPasswordFormat
}
}
Expand Down

0 comments on commit b9a83b7

Please sign in to comment.