Documentation
¶
Index ¶
Constants ¶
const (
HighEntropyStringDetectorName = "high_entropy_string"
)
const (
URLPasswordDetectorName = "url_password"
)
Variables ¶
This section is empty.
Functions ¶
func CalcShannonEntropy ¶
CalcShannonEntropy calculates how random a string is. Minimal possible level is 0, which means that all characters in the string are similar. Maximal possible level is log2(len(s)), which means that all characters in the string are different from one another.
Formula: sum( frequency(char) * log2(frequency(char)) ) See more https://en.wikipedia.org/wiki/Entropy_(information_theory)
func NewURLPasswordDetector ¶
Types ¶
This section is empty.