aboutsummaryrefslogtreecommitdiffstats
path: root/sha3sum.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsha3sum.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha3sum.py b/sha3sum.py
index 35b71dd..b79c4d4 100755
--- a/sha3sum.py
+++ b/sha3sum.py
@@ -85,7 +85,8 @@ class SHA3:
@param n:int Rotation steps
@return :int The value rotated
'''
- return ((x >> (SHA3.w - (n % SHA3.w))) + (x << (n % SHA3.w))) & SHA3.wmod
+ m = n % SHA3.w
+ return ((x >> (SHA3.w - m)) + (x << m)) & SHA3.wmod
@staticmethod