// Copyright 2020 The Swarm Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.packagemockimport("github.com/ethersphere/bee/pkg/encryption")typechunkEncrypterstruct{key[]byte}funcNewChunkEncrypter(key[]byte)encryption.ChunkEncrypter{return&chunkEncrypter{key:key}}func(c*chunkEncrypter)EncryptChunk(chunkData[]byte)(encryption.Key,[]byte,[]byte,error){enc:=New(WithXOREncryption(c.key))encryptedSpan,err:=enc.Encrypt(chunkData[:8])iferr!=nil{returnnil,nil,nil,err}encryptedData,err:=enc.Encrypt(chunkData[8:])iferr!=nil{returnnil,nil,nil,err}returnnil,encryptedSpan,encryptedData,nil}