如何在Python中加密密码,加密密码会将密码编码为随机字符序列。使用base64.b64encode()加密密码。
调用str.encode(“ utf-8”)将密码str编码为UTF-8字符串。 调用base64.b64encode(utf_string)将上一步中的utf_string编码为基本64字符串。 调用base64.b64decode(b64_string)将b64_string解码回str。
输出:
¥29.90
¥48.00¥180.00
¥199.00
¥199.00
¥48.00¥180.00
¥798.00