X-Git-Url: http://www.git.cypherpunks.ru/?p=pygost.git;a=blobdiff_plain;f=pygost%2Futils.py;h=fb0ccca49101ca9e43b3ddd0187a5dd1aee274a5;hp=0ec91fc56fe980639b88e91743d582f14759750b;hb=31b08d5a78505f0ae1a144e58d023d84eda2cc6e;hpb=82af8726ef5d5e2752089a45750e56c9910398c7 diff --git a/pygost/utils.py b/pygost/utils.py index 0ec91fc..fb0ccca 100644 --- a/pygost/utils.py +++ b/pygost/utils.py @@ -23,7 +23,7 @@ xrange = range if version_info[0] == 3 else xrange def strxor(a, b): - """ XOR of two strings + """XOR of two strings This function will process only shortest length of both strings, ignoring remaining one. @@ -52,7 +52,7 @@ def hexenc(data): def bytes2long(raw): - """ Deserialize big-endian bytes into long number + """Deserialize big-endian bytes into long number :param bytes raw: binary string :returns: deserialized long number @@ -62,7 +62,7 @@ def bytes2long(raw): def long2bytes(n, size=32): - """ Serialize long number into big-endian bytestring + """Serialize long number into big-endian bytestring :param long n: long number :returns: serialized bytestring @@ -78,7 +78,7 @@ def long2bytes(n, size=32): def modinvert(a, n): - """ Modular multiplicative inverse + """Modular multiplicative inverse :returns: inverse number. -1 if it does not exist