views:

72

answers:

2

I need a source code of md5 function written in php. (Not C, really on pure php) Where I can get this? Thanks.

I need it to make some changes to the algorithm.

+3  A: 

You can write your own based on this md5 algorithm as pseudo code.

But if the function md5() is in C it's because it will compute faster than the same algorithm in PHP. If you just want to understand how MD5 is calculated then just look at the algorithm.

Or you could use this implementation done by a SO member.


On the same topic :

Colin Hebert
Thanks for this post, I need this now :)
nXqd
A: 

Take a look at the MD5 function, built into PHP.

http://us.php.net/manual/en/function.md5.php

RexM
I think that the OP wants to rewrite the `md5()` function himself.
Colin Hebert
Yes, I want to rewrite the md5() function.
Oh, I guess I misunderstood the question.
RexM