def json_ready_header_auth(header_auth):
# type: (MessageHeaderAuthentication) -> Dict[str, Text]
"""Create a JSON-serializable representation of a
:class:`aws_encryption_sdk.internal.structures.MessageHeaderAuthentication`.
http://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/message-format.html#header-authentication
:param header_auth: header auth for which to create a JSON-serializable representation
:type header_auth: aws_encryption_sdk.internal.structures.MessageHeaderAuthentication
:rtype: dict
"""
dict_header_auth = attr.asdict(header_auth)
for key, value in dict_header_auth.items():
dict_header_auth[key] = unicode_b64_encode(value)
return dict_header_auth
评论列表
文章目录