30.12.2015, 14:32
give a try to this code
PHP код:
//Put this somewhere in script
stock num_hash(buf[])
{
new length = strlen(buf),s1 = 1,s2 = 0,n;
for(n = 0; n < length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
//Then
INI_WriteString(File, "Password", num_hash(inputtext)); //inputtext for if you are using dialog for register