aboutsummaryrefslogtreecommitdiff
path: root/src/hash.rs
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2024-06-28 13:38:09 +0200
committerNicholas Rodrigues Lordello <[email protected]>2024-06-28 13:38:13 +0200
commitbdb47ee691f0302c05daaf0278b606fbaf319f61 (patch)
tree3c414c0adbcfa8a76255502e9d5d38bdbb31d5d0 /src/hash.rs
parent0f523a185ff67848e890156c04b95f765969051d (diff)
Update dependency version
Additionally, we start using `ethdigest` instead of the `sha3` crate for doing Keccak-256 hashing and representing digest types in code.
Diffstat (limited to 'src/hash.rs')
-rw-r--r--src/hash.rs18
1 files changed, 0 insertions, 18 deletions
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()
-}