Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pontus committed Mar 7, 2024
1 parent 6d57f37 commit 27d98b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions model/headers/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ func EncryptedSegmentSize(header []byte, readerPrivateKey [chacha20poly1305.KeyS
return 0, fmt.Errorf("different data encryption methods are not supported")
}
}

return firstDataEncryptionParametersHeader.EncryptedSegmentSize, nil
}

Expand Down
4 changes: 2 additions & 2 deletions model/headers/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ func TestEncryptedSegmentSize(t *testing.T) {
t.Errorf("EncryptedSegmentSize returned unexpected size %d (expected 65564)", size)
}

size, err = EncryptedSegmentSize(header, ([32]byte)(make([]byte, 32)))
_, err = EncryptedSegmentSize(header, ([32]byte)(make([]byte, 32)))
if err == nil {
t.Errorf("EncryptedSegmentSize worked where it should fail: %v", err)
}

size, err = EncryptedSegmentSize(make([]byte, 2), readerSecretKey)
_, err = EncryptedSegmentSize(make([]byte, 2), readerSecretKey)
if err == nil {
t.Errorf("EncryptedSegmentSize worked where it should fail: %v", err)
}
Expand Down

0 comments on commit 27d98b6

Please sign in to comment.