Giter Site home page Giter Site logo

joergrosenkranz / zxcvbn-cs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trichards57/zxcvbn-cs

0.0 0.0 0.0 5.18 MB

C#/.NET port of Dan Wheeler/DropBox's Zxcvbn JS password strength estimation library

License: MIT License

PowerShell 0.58% C# 99.42%

zxcvbn-cs's Introduction

Zxcvbn C#/.NET

Build status Coverage Status NuGet

This is a port of the Zxcvbn JavaScript password strength estimation library at https://github.com/lowe/zxcvbn to .NET, written in C#. This fork moves the library to support .Net Core.

From the Zxcvbn readme:

zxcvbn, named after a crappy password, is a JavaScript password strength estimation library. Use it to implement a custom strength bar on a signup form near you!

zxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.

For full motivation, see:

http://tech.dropbox.com/?p=165

This port aims to produce comparable results with the Typescript version of Zxcvbn which I have also put out and is here https://github.com/trichards57/zxcvbn. The results structure that is returned can be interpreted in the same way as with JS Zxcvbn and this port has been tested with a variety of passwords to ensure that it return the same score as the JS version (some other details vary a little).

I have tried to keep the implementation as close as possible, but there is still a chance of some small changes. Let me know if you find any differences and I can investigate.

Using Zxcvbn-cs

The included Visual Studio project will create a single assembly, Zxcvbn.dll, which is all that is required to be included in your project.

To evaluate a password:

using Zxcvbn;

//...

var result = Zxcvbn.Core.EvaluatePassword("p@ssw0rd");

EvaluatePassword takes an optional second parameter that contains an enumerable of user data strings to also match the password against.

Interpreting Results

The Result structure returned from password evaluation is interpreted the same way as with JS Zxcvbn.

  • result.Score: 0-4 indicating the estimated strength of the password.

Licence

Since Zxcvbn-cs is a port of the original Zxcvbn the original copyright and licensing applies. Cf. the LICENSE file.

zxcvbn-cs's People

Contributors

bitbeans avatar mickford avatar trichards57 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.