]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/wrap.py
Fix wrap_cryptopro's sbox handling
[pygost.git] / pygost / wrap.py
index b988f742ada13de5ab511453983d7da34e406714..eb3855fb8ce3d7f25c18f01ae53c61df610f1783 100644 (file)
@@ -1,6 +1,6 @@
 # coding: utf-8
 # PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2021 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2022 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
@@ -79,7 +79,12 @@ def wrap_cryptopro(ukm, kek, cek, sbox=DEFAULT_SBOX):
     :returns: wrapped key
     :rtype: bytes, 44 bytes
     """
-    return wrap_gost(ukm, diversify(kek, bytearray(ukm)), cek, sbox=sbox)
+    return wrap_gost(
+        ukm,
+        diversify(kek, bytearray(ukm), sbox=sbox),
+        cek,
+        sbox=sbox,
+    )
 
 
 def unwrap_cryptopro(kek, data, sbox=DEFAULT_SBOX):