python是否等效于Java的hashUnencodedChars?

时间:2018-09-06 15:49:37

标签: java python python-2.7 hash

我正在使用Hashing.sha256().hashUnencodedChars(data)对Java中的字符串进行哈希处理,并且需要在Python中重新创建相同的哈希值。

我当前用于Python的哈希为hashlib.sha256(data.encode('utf-8')).hexdigest()

这些不会创建相同的哈希。就像Java方法所暗示的那样,它不会在散列之前对值进行编码。我可以在Python中实现相同的功能吗?

0 个答案:

没有答案
相关问题