SA-MP Forums Archive
Question? Crypting the Password? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question? Crypting the Password? (/showthread.php?tid=65638)



Question? Crypting the Password? - Monti|spearrow - 14.02.2009

Is there any default function to crypt for exampe the password?
Or can anybody script me a
Crypt(string[]); Function
Thanks alot..
~ Monte


Re: Question? Crypting the Password? - yom - 14.02.2009

Have you actually searched? there are tons.


Re: Question? Crypting the Password? - [LDT]LuxurY - 14.02.2009

For example (from DUDB.inc by Dracoblue)

pawn Код:
stock udb_hash(buf[]) {
    new length=strlen(buf);
  new s1 = 1;
  new s2 = 0;
  new n;
  for (n=0; n<length; n++)
  {
    s1 = (s1 + buf[n]) % 65521;
    s2 = (s2 + s1)   % 65521;
  }
  return (s2 << 16) + s1;
}
Cheers,
[LDT]LuxurY.


Re: Question? Crypting the Password? - Monti|spearrow - 14.02.2009

Thanks alot


Re: Question? Crypting the Password? - [LDT]LuxurY - 15.02.2009

Quote:
Originally Posted by ssǝן‾ʎ
Or if you want one that doesn't suck:

http://forum.sa-mp.com/index.php?topic=89418.0
gamemodes doesn't need such powerful hashes.


Re: Question? Crypting the Password? - kc - 15.02.2009

Quote:
Originally Posted by [LDT
LuxurY ]
Quote:
Originally Posted by ssǝן‾ʎ
Or if you want one that doesn't suck:

http://forum.sa-mp.com/index.php?topic=89418.0
gamemodes doesn't need such powerful hashes.
why not? Extra security never hurts...