def hexlify(val):
"""
This function is used to display binary data in a friendly format.
.. seealso::
:meth:`LinkageEntity:friendly_hash`
Note:
- Without the decode() the builtin `hexlify` return the bytes for
hexadecimal representation of the binary data.
- The returned string is twice as long as the length of data.
:param val: binary
:rtype: string
"""
return binascii.hexlify(val).decode()
评论列表
文章目录