Enable 3.x unicode behavior under 2.x
Created originally on Bitbucket by Anonymous
===== //(Imported from Google Code)//
Passlib currently returns unicode strings under 3.x, and bytes under 2.x, as detailed at [[http://packages.python.org/passlib/password_hash_api.html#unicode-behavior|http://packages.python.org/passlib/password_hash_api.html~#unicode-behavior]]
It might prove useful for some applications to get unicode returned even under 2.x, especially if they are already unicode aware. This should be relatively easy, by adding a global flag to change the behavior of utils.to_hash_str() and a few other routines. Would just add complication to the unittesting.
Might be worth adding at some point, especially if a request crops up.