mem: use cheaper hash for backend

This commit is contained in:
Michael Eischer 2022-10-15 23:14:33 +02:00
parent c3400d3c55
commit 28e1c4574b
1 changed files with 2 additions and 2 deletions

View File

@ -3,13 +3,13 @@ package mem
import (
"bytes"
"context"
"crypto/md5"
"encoding/base64"
"hash"
"io"
"io/ioutil"
"sync"
"github.com/cespare/xxhash/v2"
"github.com/restic/restic/internal/backend"
"github.com/restic/restic/internal/backend/sema"
"github.com/restic/restic/internal/debug"
@ -266,7 +266,7 @@ func (be *MemoryBackend) Location() string {
// Hasher may return a hash function for calculating a content hash for the backend
func (be *MemoryBackend) Hasher() hash.Hash {
return md5.New()
return xxhash.New()
}
// HasAtomicReplace returns whether Save() can atomically replace files