# coding: utf-8
-""" PBKDF2 implementation suitable for GOST R 34.11-94/34.11-2012.
+"""PBKDF2 implementation suitable for GOST R 34.11-94/34.11-2012.
This implementation is based on Python 3.5.2 source code's one.
PyGOST does not register itself in hashlib anyway, so use it instead.
from pygost.utils import bytes2long
from pygost.utils import long2bytes
from pygost.utils import strxor
-from pygost.utils import xrange # pylint: disable=redefined-builtin
+from pygost.utils import xrange
def pbkdf2(hasher, password, salt, iterations, dklen):
ocpy.update(icpy.digest())
return ocpy.digest()
- dkey = b''
+ dkey = b""
loop = 1
while len(dkey) < dklen:
prev = prf(salt + long2bytes(loop, 4))