diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-02-04 02:45:49 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-02-04 02:45:49 +0100 |
commit | c7d0d7c3b6cf4825947e56dfd69531be4b7f28c3 (patch) | |
tree | 4f06807844ddca43582fb8abe3557566bc7e3c50 /sha3sum.py | |
parent | m (diff) | |
download | sha3sum-c7d0d7c3b6cf4825947e56dfd69531be4b7f28c3.tar.gz sha3sum-c7d0d7c3b6cf4825947e56dfd69531be4b7f28c3.tar.bz2 sha3sum-c7d0d7c3b6cf4825947e56dfd69531be4b7f28c3.tar.xz |
small rotation optimisation
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'sha3sum.py')
-rwxr-xr-x | sha3sum.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |