mirror of
https://github.com/restic/restic.git
synced 2026-06-08 09:59:43 +00:00
Seed chunker with random per-repository polynomial
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/restic/restic/backend"
|
||||
"github.com/restic/restic/chunker"
|
||||
"github.com/restic/restic/debug"
|
||||
)
|
||||
|
||||
@@ -26,6 +27,11 @@ func (s *Server) SetKey(k *Key) {
|
||||
s.key = k
|
||||
}
|
||||
|
||||
// ChunkerPolynomial returns the secret polynomial used for content defined chunking.
|
||||
func (s *Server) ChunkerPolynomial() chunker.Pol {
|
||||
return chunker.Pol(s.key.Master().ChunkerPolynomial)
|
||||
}
|
||||
|
||||
// Find loads the list of all blobs of type t and searches for names which start
|
||||
// with prefix. If none is found, nil and ErrNoIDPrefixFound is returned. If
|
||||
// more than one is found, nil and ErrMultipleIDMatches is returned.
|
||||
|
||||
Reference in New Issue
Block a user