Awesome Open Source
Awesome Open Source


Android port of Dan Palmers's jquery.complexify.js.


Use Gradle:

repositories {

dependencies {
  compile 'co.infinum:complexify-android:2.0.1'


EditText editText = (EditText) findViewById(; // your editText where you want to check password complexity as user writes

Complexify complexify = new Complexify(editText, new ComplexifyListener() {
    public void onSuccess(boolean isValid, double complexity) {
        // isValid is true if password is valid, false otherwise
        // complexity is number form range [0.0, 100.0] where greater number represents greater complexity


You can override the default configuration by using setters:

setBanMode(ComplexifyBanMode banMode) // use strict (don't allow substrings of banned passwords) or loose (only ban exact matches) comparisons for banned passwords. (default: ComplexifyBanMode.STRICT)

setExecuteMode(ComplexifyExecuteMode executeMode) // defines whether execution is synchronous or asynchronous. (default: ComplexifyExecuteMode.SYNC)

setStrengthScaleFactor(int strengthScaleFactor) // scale the required password strength (higher numbers require a more complex password) (default: 1)

setMinimumChars(int minimumChars) // the minimum acceptable password length (default: 8)

setBanList(String[] banList) // array of banned passwords (default: Generated from 500 worst passwords and 370 Banned Twitter lists found <a href="">here</a>)


This code is distributed under the WTFPL v2 licence.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
java (31,769
android (6,472
android-library (815
android-development (224
password (155
edittext (32
password-strength (21