02.07.2012, 16:54
pawn Код:
stock TerroR_HashKey(Dados[]) {
static Len, Hash; Len = strlen(Dados), Hash = 0;
for(new i; i != Len; ++i) Hash += Dados[i];
return Hash;
}
@Edit
Retorna Inteiro assim evitando ter de comparar usando 'strcmp'!
Simples Exemplo:
pawn Код:
new SenhaHash = DOF2_GetInt(File, "Senha");
if(SenhaHash == TerroR_HashKey(inputtext)) {
//Acertou!
}