thebaron / passlib

Automatically exported from code.google.com/p/passlib
Other
0 stars 0 forks source link

Improve programattic access to hashes #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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...

1. 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.

2. 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. 

3. 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.

Original issue reported on code.google.com by elic@astllc.org on 28 Jun 2012 at 8:51