Giter Site home page Giter Site logo

Custom matcher about zxcvbn HOT 2 CLOSED

zxcvbn-ts avatar zxcvbn-ts commented on June 10, 2024
Custom matcher

from zxcvbn.

Comments (2)

Tostino avatar Tostino commented on June 10, 2024 1

This is another feature I wanted to support in nbvcxz.

For nbvcxz, each "match" has to implement this interface: https://github.com/GoSimpleLLC/nbvcxz/blob/master/src/main/java/me/gosimple/nbvcxz/matching/match/Match.java
and each "matcher" has to implement this one: https://github.com/GoSimpleLLC/nbvcxz/blob/master/src/main/java/me/gosimple/nbvcxz/matching/PasswordMatcher.java

So anyone can pull in nbvcxz and implement a custom matcher / match type that does whatever specific thing I didn't think of, and calculates entropy whatever way the user makes it work. They just need to use the configuration to specify that custom matcher should also be used, as by default we only run with the matchers provided with nbvcxz.

I specifically didn't make it easy to do things like a "min length", but it is still possible to do if they wanted to. You could just specify a "MinLengthMatcher" that will match to whole passwords if they are < some length, and a corresponding "MinLengthMatch" that calculates 0 (or some really low) entropy value.

After typing all this out, I see you already have a PR that you have done a good bit of this work. So likely this info is unnecessary =).

from zxcvbn.

MrWook avatar MrWook commented on June 10, 2024

Hey thanks for the insides anyway :)

Here it will be fairly easy to use custom matcher because everybody could just add more matchers in an array :D
In a perferct wolrd i would like to let the users use the custom matcher without adding a scoring to their matchers. This way they could add feedback for the password without changing the scoring but this seems to be a bit difficult.

When i have time again, i will probably fix the types in my PR and merge it.

from zxcvbn.

Related Issues (20)

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.