Check.Password.Strength 1.0.3

.NET package to check the password strength of a certain passphrase. A password strength checker based from RegEx (Regulax Expression).

Install-Package Check.Password.Strength -Version 1.0.3
dotnet add package Check.Password.Strength --version 1.0.3
<PackageReference Include="Check.Password.Strength" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Check.Password.Strength --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Check.Password.Strength, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Check.Password.Strength as a Cake Addin
#addin nuget:?package=Check.Password.Strength&version=1.0.3

// Install Check.Password.Strength as a Cake Tool
#tool nuget:?package=Check.Password.Strength&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Overview

.NET package to check the password strength of a certain passphrase. A password strength checker based from System.Text.RegularExpressions.

Build Status

Installation

You can install using the following options: Package Manager

Install-Package Check.Password.Strength

.NET CLI

dotnet add package Check.Password.Strength

PackageReference

<PackageReference Include="Check.Password.Strength" Version="1.0.2" />

Paket CLI

paket add Check.Password.Strength

Setup & Basic Usage

using CheckPasswordStrength;

public class MyClass {
    public void Test(){
        var password = "mypassword";
        var passwordStrength = password.PasswordStrength();
        // properties
        // Id = 0, Value = "Weak", Length = 10 & contains = [{Message = "lowercase"}]
    }
}

Additional Info

Object

Property Desc.
Id (int) 0 = Weak, 1 = Medium & 2 = Strong
Value (string) Weak, Medium & Strong
Contains (Collection) lowercase, uppercase, symbol and/or number
Length (int) length of the password

RegEx

Strong Password RegEx used:

^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})

Medium Password RegEx used:

^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[!@#\$%\^&\*])|((?=.*[a-z])(?=.*[!@#\$%\^&\*])|((?=.*[0-9])(?=.*[!@#\$%\^&\*]))(?=.{6,})"

RegEx Desc.
^ The password string will start this way
(?=.*[a-z]) The string must contain at least 1 lowercase alphabetical character
(?=.*[A-Z]) The string must contain at least 1 uppercase alphabetical character
(?=.*[0-9]) The string must contain at least 1 numeric character
(?=.[!@#$%^&]) The string must contain at least one special character, but we are escaping reserved RegEx characters to avoid conflict
(?=.{8,}) The string must be eight characters or longer

Other info

If you're working with node.js environment, optionally, you use this package check-password-password. This NPM package uses the same RegEx for checking password strength.

Contribute

Feel free to clone or fork this project: https://github.com/deanilvincent/Check.Password.Strength.git

Contributions & pull requests are welcome!

I'll be glad if you give this project a ★ on Github 😃

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Overview

.NET package to check the password strength of a certain passphrase. A password strength checker based from System.Text.RegularExpressions.

Build Status

Installation

You can install using the following options: Package Manager

Install-Package Check.Password.Strength

.NET CLI

dotnet add package Check.Password.Strength

PackageReference

<PackageReference Include="Check.Password.Strength" Version="1.0.2" />

Paket CLI

paket add Check.Password.Strength

Setup & Basic Usage

using CheckPasswordStrength;

public class MyClass {
    public void Test(){
        var password = "mypassword";
        var passwordStrength = password.PasswordStrength();
        // properties
        // Id = 0, Value = "Weak", Length = 10 & contains = [{Message = "lowercase"}]
    }
}

Additional Info

Object

Property Desc.
Id (int) 0 = Weak, 1 = Medium & 2 = Strong
Value (string) Weak, Medium & Strong
Contains (Collection) lowercase, uppercase, symbol and/or number
Length (int) length of the password

RegEx

Strong Password RegEx used:

^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})

Medium Password RegEx used:

^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[!@#\$%\^&\*])|((?=.*[a-z])(?=.*[!@#\$%\^&\*])|((?=.*[0-9])(?=.*[!@#\$%\^&\*]))(?=.{6,})"

RegEx Desc.
^ The password string will start this way
(?=.*[a-z]) The string must contain at least 1 lowercase alphabetical character
(?=.*[A-Z]) The string must contain at least 1 uppercase alphabetical character
(?=.*[0-9]) The string must contain at least 1 numeric character
(?=.[!@#$%^&]) The string must contain at least one special character, but we are escaping reserved RegEx characters to avoid conflict
(?=.{8,}) The string must be eight characters or longer

Other info

If you're working with node.js environment, optionally, you use this package check-password-password. This NPM package uses the same RegEx for checking password strength.

Contribute

Feel free to clone or fork this project: https://github.com/deanilvincent/Check.Password.Strength.git

Contributions & pull requests are welcome!

I'll be glad if you give this project a ★ on Github 😃

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.3 735 9/8/2020
1.0.2 175 9/8/2020
1.0.0 188 9/7/2020