Class EntropyDetector

java.lang.Object
org.sonarsource.analyzer.commons.EntropyDetector

public class EntropyDetector extends Object
  • Field Details

    • DEFAULT_MIN_SECRET_LENGTH_FOR_GIVEN_ENTROPY

      public static final int DEFAULT_MIN_SECRET_LENGTH_FOR_GIVEN_ENTROPY
      See Also:
    • DEFAULT_ENTROPY_INCREASE_FACTOR_BY_MISSING_CHARACTER

      public static final double DEFAULT_ENTROPY_INCREASE_FACTOR_BY_MISSING_CHARACTER
      See Also:
    • DEFAULT_ENTROPY_SCORE_INCREMENT

      public static final double DEFAULT_ENTROPY_SCORE_INCREMENT
      See Also:
  • Constructor Details

    • EntropyDetector

      public EntropyDetector(double randomnessSensibility)
      Randomness sensibility should be between 0 and 10.
    • EntropyDetector

      public EntropyDetector(double randomnessSensibility, int minimumSecretLengthForGivenEntropy, double entropyIncreaseFactorByMissingCharacter, double entropyScoreIncrement)
  • Method Details

    • hasEnoughEntropy

      public boolean hasEnoughEntropy(String literal)