estimatedGuesses property

  1. @override
double get estimatedGuesses
override

Should return the estimated number of guesses for the token.

Implementation

@override
double get estimatedGuesses {
  // Diceware dictionaries are special, so we get a simple scoring of
  // 1/2 of 6^5 (6 digits on 5 dice).
  // To get fix entropy of ~12.9 bits for every entry
  // https://en.wikipedia.org/wiki/Diceware#:~:text=The%20level%20of,bits
  if (dictionary == Dictionary.diceware) return pow(6, 5) / 2;
  return rank * uppercaseVariations * extraVariations;
}