use sha256 for bloom key rehashing

This commit is contained in:
vyzo
2021-03-05 14:46:18 +02:00
parent f651f43c5e
commit 35d466d847
+2 -2
View File
@@ -2,12 +2,12 @@ package splitstore
import (
"crypto/rand"
"crypto/sha256"
"golang.org/x/xerrors"
bbloom "github.com/ipfs/bbloom"
cid "github.com/ipfs/go-cid"
blake2b "github.com/minio/blake2b-simd"
)
const (
@@ -59,7 +59,7 @@ func (s *BloomMarkSet) saltedKey(cid cid.Cid) []byte {
key := make([]byte, len(s.salt)+len(hash))
n := copy(key, s.salt)
copy(key[n:], hash)
rehash := blake2b.Sum256(key)
rehash := sha256.Sum256(key)
return rehash[:]
}