"Hash" -> Safe enough?
#1

The title says it.
Is this hash thing safe enough? (So that you can't see what for a string it was)

pawn Код:
/*
    Sorry, Censored.
    - Kevin
*/
Tests:
pawn Код:
printf("%d", Hash("K"));
printf("%d", Hash("e"));
printf("%d", Hash("v"));
printf("%d", Hash("i"));
printf("%d", Hash("n"));
printf("%d", Hash("Kevin"));
Output:
Код:
1779205644
1777501708
1776387596
1777239564
1776911884
2009237004
Is this safe enough?
I did make this just because I was bored. It's quite useless and too "complicated". I just wanna know if this is safe enough :P

- Kevin
Reply
#2

save enough or safe enough?
Reply
#3

Ehm, yes I meant safe enough. My bad.
Sorry but I'm not English :P. I make alot that kind of mistakes, the same with 'live' and 'life'.
Reply
#4

Anyone?
Reply
#5

Looks like you're just adding a bunch of numbers up together and returning it.

Well, adler32 is similar to this one, but I wouldn't say, ehh, really safe.
Reply
#6

Depends on the popularity of your server, the type of protection you have over your database, and the strength, knowledge, and persistence of people who would actually go as far as to try and hijack your member database. Also if it's your own little hash function I'd assume they would have to go through all sorts of algorithms just to decrypt it.

So all in all, a hash is just a hash. Focus on your security and database privacy just as much if not more.
Reply
#7

Thank you for your reactions.
And ehm, I think I'm gonna use this then
Reply
#8

Dude, SA:MP is not NASA or US Marines, we don't have to encrypt stuff, I mean worst thing could happend if someone with access takes it and uses It.

Who in the world uses their password they use somewhere else on SA:MP anyways?
Reply
#9

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Dude, SA:MP is not NASA or US Marines, we don't have to encrypt stuff, I mean worst thing could happend if someone with access takes it and uses It.

Who in the world uses their password they use somewhere else on SA:MP anyways?
*cough* Yeah, who would? I use Whirlpool anyway, easy to set up and its really safe.
Reply
#10

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Dude, SA:MP is not NASA or US Marines, we don't have to encrypt stuff, I mean worst thing could happend if someone with access takes it and uses It.

Who in the world uses their password they use somewhere else on SA:MP anyways?
With the #1 password commonly used being "123456" and the #2 being "123456789", im willing to make the bet that TONS of people actually do this. I used to be admin on a VERY popular server that didnt have any form of encryption, as such anyone who had DB access (hacked, or granted) could see everyone's passwords. You can surely bet that this was hardcore abused. At one point a developer actually (illegally) entered a users email account to read the users personal information.

Its a VERY stupid not to encrypt your users passwords. It actually goes against one of the major rules of programming, don't assume anything . Assumptions always lead to disaster.



@OP - I wouldnt use that function if you made it / have no experience if the fields of hashes. To make a GOOD hash requires a lot of math/schooling. The big issue is how secure it is, and also how often it clashes. Clashing is more of an issue in this case (due to the audience sa-mp attracts), i would thoroughly test this before using it. Honestly i would just go with something that is guaranteed to be safe and have very little clashes (There are tons of plugins, and also mysql supports a lot of different hashes!).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)