Package org.apache.drill.exec.udfs
Class ThreatHuntingFunctions.NormedStringEntropyFunction
java.lang.Object
org.apache.drill.exec.udfs.ThreatHuntingFunctions.NormedStringEntropyFunction
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- ThreatHuntingFunctions
public static class ThreatHuntingFunctions.NormedStringEntropyFunction
extends Object
implements DrillSimpleFunc
This function calculates the Shannon Entropy of a given string of text, normed for the string length.
See: https://en.wikipedia.org/wiki/Entropy_(information_theory) for full definition.
Usage:
SELECT entropy_per_byte(
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
NormedStringEntropyFunction
public NormedStringEntropyFunction()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-