Package org.jastacry.test.utils
Class ShannonEntropy
- java.lang.Object
-
- org.jastacry.test.utils.ShannonEntropy
-
public final class ShannonEntropy extends Object
Helper functions for checking entropy.
-
-
Constructor Summary
Constructors Constructor Description ShannonEntropy()
Constructor of class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculate(byte[] bArray)
Calculate entropy.void
calculate(String in)
Calculate entropy.double
getEntropy()
String
toString()
-
-
-
Method Detail
-
getEntropy
public double getEntropy()
-
calculate
public void calculate(String in)
Calculate entropy.- Parameters:
in
- String to analyze
-
calculate
public void calculate(byte[] bArray)
Calculate entropy.- Parameters:
bArray
- byte array to analyze
-
-