muesli / crunchy

Finds common flaws in passwords. Like cracklib, but written in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to load dictionaries in memory

nvx opened this issue · comments

At the moment it is only possible to load dictionaries from disk. This precludes storing dictionaries in a database or other more easily updated location that an application could load from on startup.

Would there be any objections to exposing the inner for loop body of the indexDictionaries func outside of the package so that the dictionary could be populated by whatever is convenient for the developer with a caveat that it is not safe to call that function concurrently with any other aspect of the application (or a rwmutex to enforce that this is the case).

I guess we could just make it support any io.Reader interface? Certainly no objections to such a change!