Menu

#28 MD5 Hex CryptoPlugin for PHP/MySQL/etc compatibility

open
nobody
None
6
2005-05-11
2005-05-11
No

MySQL, PHP and md5sum (among others) generate hex
representations of MD5 sums which are not compatible
with the existing md5 implementation in pass_md5.py.
This patch adds a new 'MD5 (Hex)' crypto plugin based
on the existing one which allows users to generate new
and authenticate against existing hex md5 hashes,
thereby avoiding having to reissue passwords to
existing users.

This should also allow for migrations from other
products, for example from phpBB to CMFBoard.

diff pass_md5.py pass_md5hex.py
32,33c32,33
< digest = digest.digest()
< secret = string.strip(base64.encodestring(digest))
---
> digest = digest.hexdigest()
> secret = string.strip(digest)
43,44c43,44
< MD5Plugin1=CryptoPluginRegister('MD51', 'MD5', 'MD5
Password Only', cryptPassword)
< exUserFolder.cryptoSources['MD51']=MD5Plugin1
---
> MD5Plugin1=CryptoPluginRegister('MD5X1', 'MD5X', 'MD5
(Hex) Password Only', cryptPassword)
> exUserFolder.cryptoSources['MD5X1']=MD5Plugin1
46,47c46,47
< MD5Plugin2=CryptoPluginRegister('MD52', 'MD5', 'MD5
Username + Password', cryptPassword2)
< exUserFolder.cryptoSources['MD52']=MD5Plugin2
---
> MD5Plugin2=CryptoPluginRegister('MD5X2', 'MD5X', 'MD5
(Hex) Username + Password', cryptPassword2)
> exUserFolder.cryptoSources['MD5X2']=MD5Plugin2

Discussion

  • Sam Johnston

    Sam Johnston - 2005-05-11

    pass_md5hex.py

     
  • Sam Johnston

    Sam Johnston - 2005-05-11
    • priority: 5 --> 6
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.