]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/gost3413.py
Remove unneeded padding, as only length matters
[pygost.git] / pygost / gost3413.py
index a31a3c2e32832f0e10ec10cd01d7244180999f98..dc7339e864b21c2534ef9788e89489c8cabbd2ab 100644 (file)
@@ -1,6 +1,6 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2016 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2017 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
@@ -35,7 +35,7 @@ def pad1(data, blocksize):
 
     Just fill up with zeros if necessary.
     """
-    return data + b'\x00' * pad_size(len(data), blocksize)
+    return data + b"\x00" * pad_size(len(data), blocksize)
 
 
 def pad2(data, blocksize):
@@ -43,7 +43,7 @@ def pad2(data, blocksize):
 
     Add one bit and then fill up with zeros.
     """
-    return data + b'\x80' + b'\x00' * pad_size(len(data) + 1, blocksize)
+    return data + b"\x80" + b"\x00" * pad_size(len(data) + 1, blocksize)
 
 
 def pad3(data, blocksize):