[ph-perl] convertion of ns-mta-md5

Top Page
Author: ph-perl Mailing List
Date:  
To: ph-perl
Subject: [ph-perl] convertion of ns-mta-md5
Question for math gurus

I'm migrating a mail server using a ns-mta-md5 hashing algorithm for the
password. Could I convert this to a standard md5 hash without knowing
the password.

The hash is of the form

my $ns_mta_md5 =
    "58aea97bd961815d313bdbe9aeff2e3a42e81a7a07ad389e543fb4fd01630e84";


The first 32 is the hash, the last 32 is the salt.

The formula for getting the hash is:

my ($hash, $salt) = unpack('a32 a32', $ns_mta_md5);
my $h = Digest::MD5::md5(pack('a* C a* C a*', $salt, 89,
    $unknown_password, 247, $salt));


Is there a way of converting the result of the function:

md5(pack('a* C a* C a*', $salt, 89, $unknown_password, 247, $salt));

To:

md5($unknown_password);

_______________________________________________
ph-perl mailing list
ph-perl@???
http://lists.q-linux.com/mailman/listinfo/ph-perl