From c8560c915f56d7d74c6e1086997742187944f61b Mon Sep 17 00:00:00 2001 From: TAdev0 Date: Tue, 13 Aug 2024 14:38:05 +0200 Subject: [PATCH] use + instead of bitwise or --- src/utils.cairo | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/utils.cairo b/src/utils.cairo index 32c85bf2..5eb85b1b 100644 --- a/src/utils.cairo +++ b/src/utils.cairo @@ -74,15 +74,15 @@ pub impl HashIntoU256 of Into { let mut low: u128 = 0; let mut high: u128 = 0; - low = low | (a.into()); - low = low | shl((b.into()), 32_u32); - low = low | shl((c.into()), 64_u32); - low = low | shl((d.into()), 96_u32); - - high = high | (e.into()); - high = high | shl((f.into()), 32_u32); - high = high | shl((g.into()), 64_u32); - high = high | shl((h.into()), 96_u32); + low += (a.into()); + low += shl((b.into()), 32_u32); + low += shl((c.into()), 64_u32); + low += shl((d.into()), 96_u32); + + high += (e.into()); + high += shl((f.into()), 32_u32); + high += shl((g.into()), 64_u32); + high += shl((h.into()), 96_u32); u256 { low, high } }