/** * Shannon-entropy secret detector (stage-0 redaction, SEC-3/5). * * Runs LAST, over whatever text survives the pattern-detector pass — catches * high-randomness tokens (raw keys, unlabeled secrets) that don't match a * known vendor format. False-positive guards keep it from flagging git SHAs, * UUIDs, and file paths (see redactText doc-comment for the full list). */ /** Shannon entropy in bits/char over the token's character distribution. */ export declare function shannonEntropy(token: string): number; export interface EntropyToken { value: string; start: number; end: number; } /** Split text into whitespace-delimited tokens with their [start,end) offsets. */ export declare function tokenize(text: string): EntropyToken[]; export interface EntropyMatch { start: number; end: number; value: string; } /** Find entropy-based secret candidates in `text` above `threshold` bits/char. */ export declare function findEntropySecrets(text: string, threshold: number): EntropyMatch[]; export interface NumericSecretMatch { start: number; end: number; value: string; } /** * Find every maximal run of `minLength`+ consecutive digit characters in * `text` that is NOT immediately preceded by a label shape (see * `hasLabelPrefix`). Each match is the digit substring itself (not any * surrounding non-digit characters in the same token). */ export declare function findNumericSecretRuns(text: string, minLength?: number): NumericSecretMatch[];