Add a password strength meter to SetupActivity. Dev task #42.

This commit is contained in:
akwizgran
2014-01-09 01:29:00 +00:00
parent 1a53e9e908
commit ea47420e99
8 changed files with 168 additions and 14 deletions

View File

@@ -0,0 +1,16 @@
package org.briarproject.api.crypto;
public interface PasswordStrengthEstimator {
float NONE = 0;
float WEAK = 0.4f;
float QUITE_WEAK = 0.6f;
float QUITE_STRONG = 0.8f;
float STRONG = 1;
/**
* Returns an estimate between 0 (weakest) and 1 (strongest), inclusive,
* of the strength of the given password.
*/
float estimateStrength(char[] password);
}