summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2019-04-30 10:07:40 +0300
committerSergey Matveev <stargrave@stargrave.org>2019-04-30 10:07:40 +0300
commit739b2be4cbdbf29726d132c1fd1679590ad7957f (patch)
tree391d77867c5dcc4b6f1cac7a36179aab1bf73885
parent1e499e1ac3344b2fb7f0ff0bce6de5346c834a2c (diff)
downloadpygost-739b2be4cbdbf29726d132c1fd1679590ad7957f.tar.xz
Yet another test vector for 34.11-2012-256
-rw-r--r--pygost/test_gost34112012.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pygost/test_gost34112012.py b/pygost/test_gost34112012.py
index a5e0b71..14be493 100644
--- a/pygost/test_gost34112012.py
+++ b/pygost/test_gost34112012.py
@@ -87,6 +87,14 @@ class TestVectors(TestCase):
GOST34112012256(m).digest(),
hexdec("508f7e553c06501d749a66fc28c6cac0b005746d97537fa85d9e40904efed29d")[::-1]
)
+ def test_habr144(self):
+ """Test vector from https://habr.com/ru/post/450024/
+ """
+ m = hexdec("d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000002400000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
+ self.assertSequenceEqual(
+ GOST34112012256(m).hexdigest(),
+ "c766085540caaa8953bfcf7a1ba220619cee50d65dc242f82f23ba4b180b18e0",
+ )
class TestPBKDF2(TestCase):