开发者社区 问答 正文

python 调用Crypto ?

Traceback (most recent call last):
File "f:\pythonproject\webservice\test\aesClass.py", line 18, in
print('Python encrypt: ' + base64.b64encode(encrypt_token('dmyz.org')))
TypeError: Can't convert 'bytes' object to str implicitly

展开
收起
爱吃鱼的程序员 2020-08-21 14:16:24 445 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    encrypt_token返回的是不是bytes,你需要自己转换成str

    2020-08-21 14:16:43
    赞同 展开评论
问答分类:
问答标签:
问答地址: