: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]
: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:
: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)
: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: