Advertisement
DraKiNs

[COD] Hash string (secure)

Aug 30th, 2011
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.30 KB | None | 0 0
  1. /*
  2.  *  Created by Bruno da Silva
  3.  *  www.ips-team.blogspot.com
  4. */
  5.  
  6.  
  7. hashString(buffer[])
  8. {
  9.     new valueHash = 1;
  10.     for(new x = 1; buffer[x]; ++x) {
  11.         valueHash += (buffer[x] * 65535)  - (buffer[x - 1]);
  12.     }
  13.     return ~(((valueHash * buffer[0]) >>> strlen(buffer)) % cellmax);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement