[Snippet] MyBB Password Generation
#1

PAWN Code snippet for MYBB Forum Password Encryption.

If people want to link their user system to mybb, they will need to generate a salt etc. This snippet will hopefully help someone out there.

Code:
#include <md5>
new salt[128];

stock hashit(string[])
{
    new hashed[128],saltnstring[256];
    format(saltnstring,sizeof(saltnstring),"%s%s",MD5_Hash(salt),MD5_Hash(string));
    format(hashed,sizeof(hashed),"%s",MD5_Hash(saltnstring));
    return hashed;
}
public scriptload()
{
    salt = "zh~2X";
    print("\n--------------------------------------");
    printf("MD5x3+SALT HASH TEST: %s", hashit("test"));
    print("--------------------------------------\n");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)