]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/utils.py
Raise copyright years
[pygost.git] / pygost / utils.py
index da903ab1e532eeff5a76a9e27607ef776976924b..632eb2f2de6dfc58e4fb87c6433179c8982a4f61 100644 (file)
@@ -1,11 +1,10 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2018 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2021 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
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation, version 3 of the License.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,11 +19,11 @@ from codecs import getencoder
 from sys import version_info
 
 
-xrange = range if version_info[0] == 3 else xrange  # pylint: disable=redefined-builtin
+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.
@@ -53,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
@@ -63,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
@@ -79,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