1

Topic: What pass encription does it use?

Hi!
Can you please tell me witch encription does this BB use?
I want to make register.php so users can register on my site (table users) & on forum (table forum_users) ?
I want to data (username, password & email) go into both tables.
My site use MD5 encription.

Re: What pass encription does it use?

PunBB uses the pun_hash function for its encryption. The function determines if the server supports SHA1 and, if so, uses it, falling back on MD5 if SHA1 isn't supported. You could edit the function to only use MD5.

3

Re: What pass encription does it use?

Ok.
Where is that function declared?

4

Re: What pass encription does it use?

Or, where can I modify it?

Re: What pass encription does it use?

include/functions.php

Looking for a certain modification for your forum? Please take a look here before posting.

6 (edited by Jezdo 2006-10-01 19:00)

Re: What pass encription does it use?

Ok.
I changed it:

function pun_hash($str)
{
    /*if (function_exists('sha1'))    // Only in PHP 4.3.0+
        return sha1($str);
    else if (function_exists('mhash'))    // Only if Mhash library is loaded
        return bin2hex(mhash(MHASH_SHA1, $str));
    else
        return md5($str);*/
    return md5($str);    
}

THANKS!

Re: What pass encription does it use?

not that it really matters, but if you can use sha1 you should.  its faster an harder to crack.

Re: What pass encription does it use?

I would use SHA1 as well. PunBB 1.3 will use SHA1 only.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: What pass encription does it use?

Rickard wrote:

I would use SHA1 as well. PunBB 1.3 will use SHA1 only.

What if I have PunBB 1.2.x with MD5 encryption and want to migrate to PunBB 1.3?
Will conversion be automatic or user will have to change their password manually?

Re: What pass encription does it use?

login.php already converts from MD5 to SHA1 if the server allows it. Assuming Rickard doesn't remove that code, the passwords will be updated when people log in wink

Alternatively, the updating script could do it (or everyone could just have to reset their password)

Re: What pass encription does it use?

Thank you Smartys

Re: What pass encription does it use?

Yes, the automatic conversion will continue in 1.3. The only difference is that pun_hash() will always run sha1() (because PunBB 1.3 requires PHP 4.3.0 or later which has sha1 support)..

"Programming is like sex: one mistake and you have to support it for the rest of your life."

13

Re: What pass encription does it use?

Ok.
I don't know nothing about SHA encriptyon, but my site use MD5 so, I have to use MD5 ...
THANKS!

Re: What pass encription does it use?

http://en.wikipedia.org/wiki/Encryption

http://en.wikipedia.org/wiki/Hashing