我正在尝试将这个Fernet加密令牌插入我数据库中的表中。这是一个侦察员的加密医疗信息
b'gAAAAABcIRmX3txIuOrw6FoSxy7I1vorA8hTTzMcXQGwch_jRBtWTsR9TwVyH125K0R6zG-BTvhv_SpZuW-Hs1WotaabBVj5tQ=='
使用此Insert语句
^{pr2}$在运行时,程序执行,但是insert没有应用到表中,不,我没有忘记mydb.commit()
。我相信bytes
是MySQL不支持的数据类型,因此无法存储。在这种情况下,我将如何克服这一点,以便能够通过以下方式解密存储的令牌:
Ecy.decrypt(EcryptMedInfo)
如果存在
^{pr2}$b""
,并且您希望将其转换为字符串。您应该使用decode()
而不是str()
。因为如果使用str()
,很难将其反转,但是如果使用decode()
,则很容易恢复。在Mysql可以存储它。Mysql byte array storage
相关问题 更多 >
编程相关推荐