]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/test_gost28147.py
Raise copyright years
[pygost.git] / pygost / test_gost28147.py
index 4861b69c08a0a80d6584c25a8d1d2a9d5f0459e0..3e4298c2b9f23935c6ebf2b2d96f65875b488c6c 100644 (file)
@@ -1,6 +1,6 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2017 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2019 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
@@ -338,6 +338,13 @@ class CBCTest(TestCase):
         iv = urandom(8)
         cbc_decrypt(key, cbc_encrypt(key, 8 * b"x", iv))
 
+    def test_meshing(self):
+        pt = urandom(MESH_MAX_DATA * 3)
+        key = urandom(32)
+        ct = cbc_encrypt(key, pt)
+        dt = cbc_decrypt(key, ct)
+        self.assertEqual(pt, dt)
+
 
 class CFBMeshingTest(TestCase):
     def setUp(self):