Skip to content

rjcarneiro/Carneiro.PasswordEntropy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Entropy for .NET C

Project Description

Hello. I'm your host Ricardo Carneiro (twitter). Password Entropy is a simple calculator for weak and strong passwords using a password strength calculator for .NET languages C#.

Password Entropy will help you have an idea of the password strength of your users and easily can send errors back, reject below a certain threashold, etc.

Documentation

Here's the source code for the blog post written here.

Usage

public void Usage()
{
    const string pwd = "my-awesome-password-here";

    // PasswordEntropyStrength strength = _passwordEntropy.GetStrength(pwd);
    // model.Strength is the same as '_passwordEntropy.GetStrength(pwd)'
    PasswordEntropyModel model = _passwordEntropy.Calculate(pwd);

    if (model.Entropy < 80)
        throw new Exception("Week password");

    if (model.Strength != PasswordEntropyStrength.Good 
            && model.Strength != PasswordEntropyStrength.Strong)
        throw new Exception("Week password");
}

License

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages