我想在我的数据库表中存储一些字符串的一些哈希值。为此,我创建了一个 varchar(64) 类型的列。我确实生成这样的哈希:
>>> thehash = hashlib.sha224(some_string).digest()
现在我意识到
>>> print thehash
不一样
>>> thehash
(到目前为止,我知道>>> print 'test'和>>> 'test'...之间的区别 :-))我很困惑我现在应该存储哪个部分。还是其他repr()版本?