thebaron / passlib

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

IronPython support #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to add IronPython to the list of VMs which passlib supports. 

However, IronPython's unicode/bytes handling is a little funky: it's native 
string type is unicode (ala Python 3), but encoding or decoding a unicode 
string results in another unicode string: ``u'\xA3'.encode('utf-8')`` results 
in ``u'\xC2\xA3'``; ``u'\xC2\xA3'.decode("utf-8")`` results in ``u'\xA3'``. 
This means passlib (or any program) cannot look at a string and determine 
whether it is made of characters or bytes (at least, without some out-of-band 
information). 

This is particularly a problem for passlib, since it's currently very strict 
about unicode/bytes separation, since passwords have to be encoded *just so* 
for the various password hashes to verify correctly. 

One alternative might be to research ways to make passlib less strict, but I'm 
not sure how I feel about that in theory, much less whether it would be 
sufficient to solve the problem.

So putting the ironpython-support-dev branch on the back burner for now.

Original issue reported on code.google.com by elic@astllc.org on 18 Apr 2012 at 4:14