PasswordStrength

Password Strength is an Android Library that checks for a password strength.

License

License

GroupId

GroupId

com.zeoflow
ArtifactId

ArtifactId

password-strength
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

aar
Description

Description

PasswordStrength
Password Strength is an Android Library that checks for a password strength.
Project URL

Project URL

https://github.com/zeoflow/password-strength
Source Code Management

Source Code Management

https://github.com/zeoflow/password-strength

Download password-strength

How to add to project

<!-- https://jarcasting.com/artifacts/com.zeoflow/password-strength/ -->
<dependency>
    <groupId>com.zeoflow</groupId>
    <artifactId>password-strength</artifactId>
    <version>1.3.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.zeoflow/password-strength/
implementation 'com.zeoflow:password-strength:1.3.0'
// https://jarcasting.com/artifacts/com.zeoflow/password-strength/
implementation ("com.zeoflow:password-strength:1.3.0")
'com.zeoflow:password-strength:aar:1.3.0'
<dependency org="com.zeoflow" name="password-strength" rev="1.3.0">
  <artifact name="password-strength" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.zeoflow', module='password-strength', version='1.3.0')
)
libraryDependencies += "com.zeoflow" % "password-strength" % "1.3.0"
[com.zeoflow/password-strength "1.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
androidx.core » core-ktx jar 1.3.2
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.4.30

Project Modules

There are no modules declared in this project.

Password Strength for Android

Intro

Password Strength is an Android Library that checks for a password strength.

Getting Started

For information on how to get started with Password Strength, take a look at our Getting Started guide.

Submitting Bugs or Feature Requests

Bugs or feature requests should be submitted at our GitHub Issues section.

How does it work?

1. Depend on our library

Password Strength for Android is available through Google's Maven Repository. To use it:

  1. Open the build.gradle file for your application.

  2. Make sure that the repositories section includes Google's Maven Repository google(). For example:

      allprojects {
        repositories {
          google()
          jcenter()
        }
      }
  3. Add the library to the dependencies section:

      dependencies {
        // ...
        implementation 'com.zeoflow:password-strength:<version>'
        // ...
      }

2. Activity/Fragment Class

MainActivity.java

public class MainActivity extends BindAppActivity<ActivityMainBinding, MainViewBinding>
{
    //..
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        //..

        // Create a map of excluded words on a per-user basis using a hypothetical "User" object that contains this info
        List<Dictionary> dictionaryList = ConfigurationBuilder.getDefaultDictionaries(this);
        dictionaryList.add(new DictionaryBuilder(this)
            .setDictionaryName("exclude")
            .setExclusion(true)
            .addWord("word", 0)
            .createDictionary());

        // Create our configuration object and set our custom minimum
        // entropy, and custom dictionary list
        Configuration configuration = new ConfigurationBuilder()
            .setMinimumEntropy(40d)
            .setDictionaries(dictionaryList)
            .createConfiguration(this);

        // Create our PasswordChecker object with the configuration we built
        PasswordChecker passwordChecker = new PasswordChecker(configuration);

        // passwordStrength is of PasswordType type
        // PasswordType can be (VERY_WEAK, WEAK, MEDIUM, STRONG, VERY_STRONG)
        PasswordType passwordStrength = passwordChecker.estimate("asdasdssd").getStrength();

        //..
    }
    //..
}

License

Copyright 2020 ZeoFlow

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
com.zeoflow

ZeoFlow

From ZeoFlow with ❤️ to Developers

Versions

Version
1.3.0
1.1.0
1.0.0