# coding: utf-8
# PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2016 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
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
+from pygost.utils import xrange # pylint: disable=redefined-builtin
digest_size = 8
SEQ_MAC = (
"""
digest_size = digest_size
- def __init__(self, key, data=b'', iv=8 * b'\x00', sbox=DEFAULT_SBOX):
+ def __init__(self, key, data=b"", iv=8 * b"\x00", sbox=DEFAULT_SBOX):
"""
:param key: authentication key
:type key: bytes, 32 bytes
)[::-1]
return ns2block(prev)
- def hexdigest(self):
- return hexenc(self.digest())
-
-def new(key, data=b'', iv=8 * b'\x00', sbox=DEFAULT_SBOX):
+def new(key, data=b"", iv=8 * b"\x00", sbox=DEFAULT_SBOX):
return MAC(key, data, iv, sbox)