python对字符串进行十六进制转换(加密解密)
字符串:
data = '你好,my name is 123'
转成十六进制字符串:
e4bda0e5a5bdefbc8c6d79206e616d6520697320313233
或者反过来,把十六进制转回字符串。
示例代码如下:
# !/usr/bin/python
# -*- coding: utf-8 -*-
"""
@contact: 微信 1257309054
@file: 十六进制加密解密.py
@time: 2022/11/3 21:15
@author: LDC
"""
data = '你好,my name is 123'
encode_data =