X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fpbkdf2.py;h=0fd6ddcbe72400e6002b87135f7e6ba77c6e5f1a;hb=31b08d5a78505f0ae1a144e58d023d84eda2cc6e;hp=d1e07a69a39ff85b8e5a759b38bd22f8974a63fb;hpb=d59175f7b4ae74bf32dee438fb64577140e0ac23;p=pygost.git diff --git a/pygost/pbkdf2.py b/pygost/pbkdf2.py index d1e07a6..0fd6ddc 100644 --- a/pygost/pbkdf2.py +++ b/pygost/pbkdf2.py @@ -1,5 +1,5 @@ # 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. @@ -28,7 +28,7 @@ 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))