MD4 and DES for unicode strings (samba passwd file manipulation)

Arcady Genkin agenkin at cdf.toronto.edu
Wed Sep 4 17:23:01 EDT 2002


martin at v.loewis.de (Martin v. Loewis) writes:

"Fredrik Lundh" <fredrik at pythonware.com> writes:

> if you want a string of 16-bit little-endian unicode characters,
> make sure you have one:
>
>     m = MD4.new()
>     m.update(password.encode("utf-16-le"))
>     m.hexdigest().upper()
>
> (I don't have the MD4 library, so I cannot verify this.  But if
> it works, it works for both 8-bit strings with ASCII text, and
> Unicode strings)

Yep, this works.  Thank you both very much!
-- 
Arcady Genkin : CDF sysadmin : http://cdf.toronto.edu/~agenkin/contact.html

guilt is the cause of more disauders
than history's most obscene marorders                       (E.E. Cummings)



More information about the Python-list mailing list