mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
mem: use cheaper hash for backend
This commit is contained in:
parent
c3400d3c55
commit
28e1c4574b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user