a 为 一个加密的字符串
c 为需要加密的字符串
import base64
a = "MjAyMDExMTMtMTAx"
b = base64.b64decode(a)
print(b)
c = "20201113-100"
d = c.encode("utf-8")
e = base64.b64encode(d)
print(e)
运行结果
b’20201113-101’
b’MjAyMDExMTMtMTAw’
Process finished with exit code 0