From 03ab406bb45e80d06594b1418ebc61dd801b4993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michele=20Orr=C3=B9?= Date: Wed, 18 Dec 2024 13:03:23 +0100 Subject: [PATCH] Remove generic_array dependency from Cargo.toml. --- nimue/Cargo.toml | 1 - nimue/src/hash/legacy.rs | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nimue/Cargo.toml b/nimue/Cargo.toml index 6d102a0..c6bfce1 100644 --- a/nimue/Cargo.toml +++ b/nimue/Cargo.toml @@ -10,7 +10,6 @@ license = "BSD-3-Clause" zeroize = { version = "1.6.0", features = ["zeroize_derive"] } rand = { version = "0.8", features = ["getrandom"] } digest = "^0.10.7" -generic-array = "^0.14.4" # used as default hasher for the prover keccak = { version = "0.1.4"} log = "0.4.20" diff --git a/nimue/src/hash/legacy.rs b/nimue/src/hash/legacy.rs index 62b4346..9a47c24 100644 --- a/nimue/src/hash/legacy.rs +++ b/nimue/src/hash/legacy.rs @@ -17,14 +17,14 @@ //! and finally `squeeze_end` will set the state `cv` to the current squeeze digest and length. //! use digest::{core_api::BlockSizeUser, typenum::Unsigned, Digest, FixedOutputReset, Reset}; -use generic_array::GenericArray; +use digest::crypto_common::generic_array::GenericArray; use zeroize::Zeroize; use super::DuplexHash; /// A Bridge to our sponge interface for legacy `Digest` implementations. #[derive(Clone)] -pub struct DigestBridge { +pub struct DigestBridge { /// The underlying hasher. hasher: D, /// Cached digest @@ -90,14 +90,14 @@ impl DigestBridge { } } -impl Zeroize for DigestBridge { +impl Zeroize for DigestBridge { fn zeroize(&mut self) { self.cv.zeroize(); Digest::reset(&mut self.hasher); } } -impl Drop for DigestBridge { +impl Drop for DigestBridge { fn drop(&mut self) { self.zeroize(); }