diff --git a/pkg/services/object/get/get.go b/pkg/services/object/get/get.go index 1e0ae0110..43e7d50b6 100644 --- a/pkg/services/object/get/get.go +++ b/pkg/services/object/get/get.go @@ -4,6 +4,7 @@ import ( "context" objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-node/pkg/util" "go.uber.org/zap" ) @@ -33,7 +34,7 @@ func (s *Service) GetRangeHash(ctx context.Context, prm RangeHashPrm) (*RangeHas rngPrm.SetRange(rng) rngPrm.SetChunkWriter(&hasherWrapper{ - hash: h, + hash: util.NewSaltingWriter(h, prm.salt), }) if err := s.GetRange(ctx, rngPrm); err != nil { diff --git a/pkg/services/object/get/util.go b/pkg/services/object/get/util.go index 82a20ec1b..4c6a63593 100644 --- a/pkg/services/object/get/util.go +++ b/pkg/services/object/get/util.go @@ -2,7 +2,7 @@ package getsvc import ( "crypto/ecdsa" - "hash" + "io" "github.com/nspcc-dev/neofs-api-go/pkg/client" objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" @@ -40,7 +40,7 @@ type partWriter struct { } type hasherWrapper struct { - hash hash.Hash + hash io.Writer } func NewSimpleObjectWriter() *SimpleObjectWriter {