我试着运行这段代码,但它一直给出一个错误,说“没有编码的字符串参数”。
ota_packet = ota_packet.encode('utf-8') + bytearray(content[current_pos:(final_pos)]) + '\0'.encode('utf-8')
有什么帮助吗?
发布于 2020-12-11 15:37:46
byteObject = b'\x18,\xa3\xf0A\x93*<bAd\x15K.A\xba'
print(byteObject)
print('-----------asbytearray----------')
print('-------As a string------------------')
o = base64.b64encode(bytes(str(byteObject), 'utf-8'))
print(o.decode("utf-8"))`enter code here`
print('--------Nonce as a string------------------')
https://stackoverflow.com/questions/31161243
复制相似问题