Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(seg65) #4604

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/encryption/chunk_encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ func (c *chunkEncrypter) EncryptChunk(chunkData []byte) (Key, []byte, []byte, er
}

func newSpanEncryption(key Key) Interface {
refSize := int64(swarm.HashSize + KeyLength)
return New(key, 0, uint32(swarm.ChunkSize/refSize), sha3.NewLegacyKeccak256)
return New(key, 0, uint32(swarm.ChunkSize/KeyLength), sha3.NewLegacyKeccak256)
}

func newDataEncryption(key Key) Interface {
Expand Down
3 changes: 1 addition & 2 deletions pkg/encryption/store/decrypt_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ func decrypt(chunkData []byte, key encryption.Key) ([]byte, []byte, error) {
}

func newSpanEncryption(key encryption.Key) encryption.Interface {
refSize := int64(swarm.HashSize + encryption.KeyLength)
return encryption.New(key, 0, uint32(swarm.ChunkSize/refSize), sha3.NewLegacyKeccak256)
return encryption.New(key, 0, uint32(swarm.ChunkSize/encryption.KeyLength), sha3.NewLegacyKeccak256)
}

func newDataEncryption(key encryption.Key) encryption.Interface {
Expand Down
Loading