[Snippet] MyBB Password Generation - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Discussion (
https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: [Snippet] MyBB Password Generation (
/showthread.php?tid=603560)
[Snippet] MyBB Password Generation -
kickerbat - 25.03.2016
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;
}