From bdb47ee691f0302c05daaf0278b606fbaf319f61 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Fri, 28 Jun 2024 13:38:09 +0200 Subject: Update dependency version Additionally, we start using `ethdigest` instead of the `sha3` crate for doing Keccak-256 hashing and representing digest types in code. --- src/hash.rs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/hash.rs (limited to 'src/hash.rs') diff --git a/src/hash.rs b/src/hash.rs deleted file mode 100644 index b3091d2..0000000 --- a/src/hash.rs +++ /dev/null @@ -1,18 +0,0 @@ -//! Module implementing various hashing utilities. - -use sha2::{Digest as _, Sha256}; -use sha3::Keccak256; - -/// Returns the Keccak-256 hash of the specified input. -pub fn keccak256(data: impl AsRef<[u8]>) -> [u8; 32] { - let mut hasher = Keccak256::new(); - hasher.update(data.as_ref()); - hasher.finalize().into() -} - -/// Returns the SHA256 hash of the specified input. -pub fn sha256(data: impl AsRef<[u8]>) -> [u8; 32] { - let mut hasher = Sha256::new(); - hasher.update(data.as_ref()); - hasher.finalize().into() -} -- cgit v1.2.3