0

Are there any cryptographically secure hash functions that can be given a array of strings to hash, and will always calculate the same output no matter what order the array elements are in?

I realize that one could merge the array elements into one string and hash that, but I'm asking specifically about functions that are order-independent (like bloom filters) but cryptographically secure (unlike bloom filters)

4

2 回答 2

0

对数组进行排序,应用您喜欢的任何编码将数组转换为一个字符串,并应用标准加密哈希。

于 2018-03-30T18:40:59.413 回答
0

在 Cryptography StackExchange 上问了同样的问题后,我被提到了这个问题,它描述了 Multiset Hash Functions,特别是 MSet-Mu-Hash 和 MSet-VAdd-Hash 函数:https ://crypto.stackexchange.com/questions/54544 /how-to-to-calculate-the-hash-of-an-unordered-set

于 2018-03-31T08:29:48.727 回答