from pygost.gost28147 import xcrypt
from pygost.gost3413 import pad1
from pygost.iface import PEP247
-from pygost.utils import hexenc
from pygost.utils import strxor
from pygost.utils import xrange
)[::-1]
return ns2block(prev)
- def hexdigest(self):
- return hexenc(self.digest())
-
def new(key, data=b"", iv=8 * b"\x00", sbox=DEFAULT_SBOX):
return MAC(key, data, iv, sbox)
hsh = g(0, hsh, chk)
return hsh[-self._digest_size:]
- def hexdigest(self):
- return hexenc(self.digest())
h = _step(h, checksum, self.sbox)
return h[::-1]
- def hexdigest(self):
- return hexenc(self.digest())
-
def new(data=b"", sbox=DEFAULT_SBOX):
return GOST341194(data, sbox)
from abc import ABCMeta
from abc import abstractmethod
+from pygost.utils import hexenc
+
# This function is taken from six package as is
def add_metaclass(metaclass):
"""Return the hash value as a string containing 8-bit data.
"""
- @abstractmethod
def hexdigest(self):
"""Return the hash value as a string containing hexadecimal digits.
"""
+ return hexenc(self.digest())