From c4508480c184c37bc7f5158379dc083155ee464b Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Thu, 26 Dec 2024 19:59:27 -0800
Subject: [PATCH] reuse hash source function

---
 src/main.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 3e2c24b..5181388 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -139,9 +139,7 @@ async fn review(config:ReviewConfig)->Result<(),ReviewError>{
 					submissions_api::types::Policy::Allowed
 				}else{
 					// compute hash
-					let mut hasher=siphasher::sip::SipHasher::new();
-					std::hash::Hasher::write(&mut hasher,source.as_bytes());
-					let hash=std::hash::Hasher::finish(&hasher);
+					let hash=hash_source(source.as_str());
 
 					// check if modified script already exists
 					let maybe_script_response=api.get_script_from_hash(submissions_api::types::HashRequest{