from pygost.gost3413 import unpad2
from pygost.utils import hexdec
from pygost.utils import strxor
-from pygost.utils import xrange # pylint: disable=redefined-builtin
+from pygost.utils import xrange
KEYSIZE = 32
def addmod(x, y, mod=2 ** 32):
""" Modulo adding of two integers
"""
- r = x + y
- return r if r < mod else r - mod
+ return (x + y) % mod
def _shift11(x):