aboutsummaryrefslogtreecommitdiff
path: root/src/hash.rs
diff options
context:
space:
mode:
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()
-}