On Sun January 29 2006 11:24, Mark Bucciarelli wrote:
> On Fri, Jan 27, 2006 at 06:22:33PM -0500, Sam Varshavchik wrote:
> > Mark Bucciarelli writes:
> > >I'm having trouble getting the mysql authdaemond module to work
> > > with MD5 password hashes.
> > >
> > >After "authtest myuser mypass", the log says:
> > >
> > > authdaemond: supplied password 'mypass' does not match
> > > encrypted password '
> > > {MD5}a029d0df84eb5549c641e04a9ef389e5
> >
> > You need to use base64-encoding, not hex-encoding. Something like:
> >
> > $ perl -e 'use Digest::MD5 qw(md5_base64); print "{MD5}" .
> > md5_base64("mypass") . "\n";'
> > {MD5}oCnQ34TrVUnGQeBKnvOJ5Q
>
> I see.
>
> Bummer. PHP's md5() uses hex-encoding. I wanted to auth against a
> Drupal user db.
Like http://us2.php.net/manual/en/function.md5.php says?
<?php
function md5_base64 ( $data )
{
return preg_replace('/=+$/','',base64_encode(pack('H*',md5($data))));
}
?>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users