Quote:
Originally Posted by EmpireSk
Lyrhash?
It's like Whirpool
PHP код:
stock lyrhash(what[])
{
new newstr[129];
new out[129];
new deflen = strlen(what);
new newlen = deflen;
new changeval[3] = {0, -1, 1};
format(newstr, 129, "%c%s", 1, what);
while(newlen < 128)
{
newstr[newlen] = newstr[newlen % (deflen + 1)];
newlen++;
}
for(new i=0; i<128; i++) changeval[0] += newstr[i];
changeval[1] -= (changeval[0] % 100) + newstr[deflen % 128];
changeval[2] = floatround(floatpower(changeval[0] % 216, changeval[1] % 4));
for(new i=0; i<128; i++)
{
out[i] = 65 + ((i + changeval[0] + changeval[1] + changeval[2]) % 26);
changeval[0] -= changeval[1];
changeval[1] -= i;
changeval[2] += changeval[0] % 5;
}
return out;
}
PHP код:
Password = KORVYENATQVIELBEUYSAASDJIEXOFULEABFQIISKOEHZEANSRIVEKPRUYEOASQVJEKBEVYRAATDIIEYOEULFAAFQJIRKOFHYEAOSQIVFKORUZENASRVI
|
why not just hash-salt if you want something safe? i see the only reason to cause this would be the hashing you must load the password the same way it was saved.