From b9a83b7153c999542a288bb9219897968e01ec34 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 10 Apr 2024 16:00:40 +0100 Subject: [PATCH] Migrate deprecated dependency `crypto-mac` to `digest` --- Cargo.toml | 4 ++-- src/pass/error.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3fca4d9..66afc7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/src/pass/error.rs b/src/pass/error.rs index a117fb3..14b3a01 100644 --- a/src/pass/error.rs +++ b/src/pass/error.rs @@ -99,8 +99,8 @@ impl From for ErrorCode { } } -impl From for ErrorCode { - fn from(_error: crypto_mac::InvalidKeyLength) -> Self { +impl From for ErrorCode { + fn from(_error: digest::InvalidLength) -> Self { ErrorCode::InvalidPasswordFormat } }