import jwt
#加密
encode_jwt = jwt.encode({'uid':'123'},'123',algorithm='HS256')
print(encode_jwt)
#解密
#强转
encode_jwt = str(encode_jwt)
decode_jwt = jwt.decode('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxMjMifQ.E7khw5yHf-13Uwby7c2pbmDVz_lHazrVMjTGgNPU3ZM','123',algorithms=['HS256'])
print(decode_jwt)
标签:加密,jwt,Jwt,decode,123,encode
From: https://www.cnblogs.com/djl-0628/p/16999988.html