Android app that calculates password strength, verifies user entries, and gives recommendations on what the user should improve to get a stronger password.
It also implements an algorithm that calculates how long it would take a computer to crack the password and showed using LiveData
We calculate the number of possibilities for each set of password characters:
-> for A-Z is 26 ^ number_of_characters
-> for a-z is 26 ^ number_of_characters
-> for 0-9 is 10 ^ number_of_characters
-> for symbols is 32 ^ number_of_characters
As a result, it is divided by 2 to reduce keyspace search by Law of Averages and multiplied by the assigned workload average / computer (number of keys that a desktop computer can test efficiently in one hour (= 2 * 2 ^ 33)) and the estimated gross number of hours to crack the password is obtained.
Then just do a few simple calculations to get milliseconds / seconds / minutes / hours / days / weeks / months / years / centuries