hashids / hashids.github.io

This is the old Hashids website. It is no longer maintained and has migrated over to Sqids.
https://sqids.org
206 stars 34 forks source link

"what not to do" section related to "Do not encode strings" #31

Closed titoBouzout closed 8 years ago

titoBouzout commented 8 years ago

Hi there, I'm looking for a lib to hash strings as short as possible, I know this I came to see if I can find an alternative linked, suddenly read this:

Do not encode strings. We've had several requests to add this feature — "it seems so easy to add". We will not add this feature for security purposes, doing so encourages people to encode sensitive data, like passwords. This is the wrong tool for that.

Basically you saying Im stupid. There could be valid reasons to try to hash a string as short as possible, right know Im trying to figure out how to have more of 1 unique id on rethinkdb, to solve the sharding problem with tables that should in theory have more than 1 unique field on the same table. I need to hash and store in memory the usernames and email, because rethinkdb cannot garantee the uniquess of the field. I came here because I was sure you can do this task correctly, basically I cannot really validate that this works correctly https://github.com/bibig/node-shorthash/blob/master/shorthash.js because I dont really understand whats doing there and I dont have the experience of other possible related problems you also found while doing this very similar library..... but instead of a solution, you telling me Im retard. Thanks

PhilETaylor commented 8 years ago

Encoding strings is NOT a feature of this FREE OPEN SOURCE project. So simply move on in your search.

This project has NEVER encoded strings and therefore is NOT FIT FOR YOUR USE

ABUSING developers is NOT the way to get your way.

Basically you are just demanding that this project does something different to what you want, and because you cannot be bothered to keep looking, and you "dont have the experience"

Basically you want someone to create a nuclear bomb and then to hand that bomb to you, because you are not stupid/retard and will use it correctly... well sir, that in itself is stupid.

What you should be researching is rethinkdb's internal API functions that provide UUID's https://rethinkdb.com/api/javascript/uuid/

Yes, I think you have issues - but raising an issue at this project is not going to help you with that.

titoBouzout commented 8 years ago

If strings is not a feature you could say just that. But telling me Im gonna use it for a password is telling me Im an idiot. That is abuse, tell you don't want to create a nuclear bomb do not tell me Im gonna use it as the lock of my house. your wording is wrong.

And what's the difference of creating a maybe predictable string from a number with a maybe predictable string? I don't understand your logic is flawed, someone can take your random string and use it as a password.

You also didn't understand my problem, rethinkdb cannot guarantee that a username is unique unless you marked it as unique, and if you do that, then you CANNOT mark as unique any other field on the same TABLE, for example an email or a primary key. Was that clear?

I didn't even asked for help here, I know you only hash a number, whatever, I came to see if you linked a recommended library or something, and instead found that stupid wording.

Have a nice day......

PhilETaylor commented 8 years ago

Github issues are for reporting bugs and issues with software - not for having a moan... life is too short.

titoBouzout commented 8 years ago

If you don't like it, is fine. I didn't like the wording of the website, and this seems to be the repository.

titoBouzout commented 8 years ago

Of a problem that also seems to be recurrent with your software. bye

ghost commented 8 years ago

The wording on the site is perfectly reasonable and polite. There is no reason whatsoever to change it.

instead of a solution, you telling me Im retard. Thanks.

@titoBouzout No, it most certainly did not. That's your imagination and perhaps a bit of insecurity about your level of intelligence.

I'm just going to close this useless issue now. I'd like to apply a label, but none seem appropriate. WontFix implies that there is something broken that won't be fixed. I think a more apt label for this issue would be Mu.