]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/test_gost28147.py
Unify docstring's leading space presence
[pygost.git] / pygost / test_gost28147.py
index 5ccb6870693ad22ffac0a3c1ebea3831783299ce..5e9da8d10d4805b91fb409ea0d29e1faf4c24b4d 100644 (file)
@@ -37,7 +37,7 @@ from pygost.utils import strxor
 
 class ECBTest(TestCase):
     def test_gcl(self):
-        """ Test vectors from libgcl3
+        """Test vectors from libgcl3
         """
         sbox = "id-Gost28147-89-TestParamSet"
         key = hexdec(b"0475f6e05038fbfad2c7c390edb3ca3d1547124291ae1e8a2f79cd9ed2bcefbd")
@@ -115,7 +115,7 @@ class ECBTest(TestCase):
         self.assertSequenceEqual(decrypted, plaintext)
 
     def test_cryptopp(self):
-        """ Test vectors from Crypto++ 5.6.2
+        """Test vectors from Crypto++ 5.6.2
         """
         sbox = "AppliedCryptography"
         data = (
@@ -135,7 +135,7 @@ class ECBTest(TestCase):
             self.assertSequenceEqual(ecb_encrypt(key, pt, sbox=sbox), ct)
 
     def test_cryptomanager(self):
-        """ Test vector from http://cryptomanager.com/tv.html
+        """Test vector from http://cryptomanager.com/tv.html
         """
         sbox = "id-GostR3411-94-TestParamSet"
         key = hexdec(b"75713134B60FEC45A607BB83AA3746AF4FF99DA6D1B53B5B1B402A1BAA030D1B")
@@ -147,7 +147,7 @@ class ECBTest(TestCase):
 
 class CFBTest(TestCase):
     def test_cryptomanager(self):
-        """ Test vector from http://cryptomanager.com/tv.html
+        """Test vector from http://cryptomanager.com/tv.html
         """
         key = hexdec(b"75713134B60FEC45A607BB83AA3746AF4FF99DA6D1B53B5B1B402A1BAA030D1B")
         sbox = "id-GostR3411-94-TestParamSet"
@@ -171,7 +171,7 @@ class CFBTest(TestCase):
         )
 
     def test_steps(self):
-        """ Check step-by-step operation manually
+        """Check step-by-step operation manually
         """
         key = urandom(KEYSIZE)
         iv = urandom(BLOCKSIZE)
@@ -194,7 +194,7 @@ class CFBTest(TestCase):
         self.assertSequenceEqual(step[:4], ciphertext[16:])
 
     def test_random(self):
-        """ Random data with various sizes
+        """Random data with various sizes
         """
         key = urandom(KEYSIZE)
         iv = urandom(BLOCKSIZE)
@@ -208,7 +208,7 @@ class CFBTest(TestCase):
 
 class CTRTest(TestCase):
     def test_gcl(self):
-        """ Test vectors from libgcl3
+        """Test vectors from libgcl3
         """
         sbox = "id-Gost28147-89-TestParamSet"
         key = hexdec(b"0475f6e05038fbfad2c7c390edb3ca3d1547124291ae1e8a2f79cd9ed2bcefbd")
@@ -287,7 +287,7 @@ class CTRTest(TestCase):
         self.assertSequenceEqual(decrypted, plaintext)
 
     def test_gcl2(self):
-        """ Test vectors 2 from libgcl3
+        """Test vectors 2 from libgcl3
         """
         sbox = "id-Gost28147-89-TestParamSet"
         key = hexdec(b"fc7ad2886f455b50d29008fa622b57d5c65b3c637202025799cadf0768519e8a")