On 2009-9-23 13:29, Daniel Holth wrote:
> sqlite for example will always return strings as unicode strings, or
> it will always return strings as byte strings. It doesn't know how to
> return the username colum as one kind of string and the hash column as
> another kind of string.

SQLite is an extremely minimal database. This is just one of the 
situations where you need to massage its output. If you use SQLAlchemy 
on top of SQLite this will work properly.

> I think this is really a bug in the urlsafe base64 module. This works:
> unicode(u"foobar".encode('base64')).decode('base64')

That generates something entirely differently than standard SSHA1 
implementations, which will break interop.

Wichert.

-- 
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to