]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/wrap.py
Missing 3.6 news
[pygost.git] / pygost / wrap.py
index 4ab17370d2df7c80f6272c5fe8ac5c266afebd92..d444db4292baf4e7302c523c76275c2362d91f96 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
@@ -37,7 +37,7 @@ def wrap_gost(ukm, kek, cek):
     :type kek: bytes, 32 bytes
     :param cek: content encryption key
     :type cek: bytes, 32 bytes
-    :return: wrapped key
+    :returns: wrapped key
     :rtype: bytes, 44 bytes
     """
     cek_mac = MAC(kek, data=cek, iv=ukm).digest()[:4]
@@ -52,7 +52,7 @@ def unwrap_gost(kek, data):
     :type kek: bytes, 32 bytes
     :param data: wrapped key
     :type data: bytes, 44 bytes
-    :return: unwrapped CEK
+    :returns: unwrapped CEK
     :rtype: 32 bytes
     """
     if len(data) != 44:
@@ -73,7 +73,7 @@ def wrap_cryptopro(ukm, kek, cek):
     :type kek: bytes, 32 bytes
     :param cek: content encryption key
     :type cek: bytes, 32 bytes
-    :return: wrapped key
+    :returns: wrapped key
     :rtype: bytes, 44 bytes
     """
     return wrap_gost(ukm, diversify(kek, bytearray(ukm)), cek)
@@ -86,7 +86,7 @@ def unwrap_cryptopro(kek, data):
     :type kek: bytes, 32 bytes
     :param data: wrapped key
     :type data: bytes, 44 bytes
-    :return: unwrapped CEK
+    :returns: unwrapped CEK
     :rtype: 32 bytes
     """
     if len(data) < 8: