Files
keyhunter/pkg/types/chunk.go
salvacybersec 45cc676f55 feat(01-04): add shared Chunk type, Finding struct, Shannon entropy, and MaskKey
- pkg/types/chunk.go: shared Chunk struct breaking engine<->sources circular import
- pkg/engine/finding.go: Finding struct with MaskKey for pipeline output
- pkg/engine/entropy.go: Shannon entropy function using math.Log2
- pkg/engine/entropy_test.go: TDD tests for Shannon and MaskKey
2026-04-05 12:18:26 +03:00

11 lines
386 B
Go

package types
// Chunk is a segment of file content passed through the scanning pipeline.
// Defined in pkg/types (not pkg/engine) so that pkg/engine/sources can use it
// without creating a circular import with pkg/engine.
type Chunk struct {
Data []byte // raw bytes
Source string // file path, URL, or description
Offset int64 // byte offset of this chunk within the source
}