Improve programattic access to hashes
Created originally on Bitbucket by Anonymous
(Imported from Google Code)
Various applications which need to dynamically look up hashes, and have taken various routes - trapping calls to {{{getattr(passlib.hash, name)}}}, access through the clunkily-named passlib.registry methods, etc.
For 1.7, would like to clean this up. Current ideas...
-
expose schemes() and handler() methods similar to CryptContext, placed in the passlib.hash module. This is where people would expect, but need to be sure it won't confusingly pollute the namespace.
-
expose similar methods to (1), but put them in passlib.registry. Don't like having an extra module if it's not needed, but this might be cleaner.
-
expose a "master" CryptContext instance which supports all hashes. would have to work out lazy-loading issues.
Additionally, this probably needs some custom functions such as fuzzy_identify() from the cmdline-dev branch, etc.
Need to study current uses of passlib some more.