05.07.2012, 15:11
pawn Код:
hash_reeBR(input[])
{
new
keycore = 0,
index,
len = strlen(input);
for(; index < len; index++)
{
if(!keycore)
keycore = input[index] & 0xFF;
else
keycore = (keycore + (input[index] & 0xFF)) / 2;
}
new hash[129];
for(index = 0; index < len; index++)
{
new currentcell = 128 % len,
hex[2],
value;
value = (input[index] * keycore) % 0xFF;
format(hex, sizeof hex, "%x", value);
hash[currentcell] = hex[0];
hash[currentcell+1] = hex[1];
}
return hash;
}
** Esse hash й de mгo ъnica. Hash, redundвncia...