It's a simple solution. Sure, it is still possible for something to slip through that looks similar to something bad. But the potential to strongly offend is greatly reduced.
It's a simple solution. Sure, it is still possible for something to slip through that looks similar to something bad. But the potential to strongly offend is greatly reduced.
Also note that if you're too naive about checking for 'naughty' words, you get https://en.wikipedia.org/wiki/Scunthorpe_problem
What is 'v' in this context?
Edit: thanks for the answers. It makes sense now.
the combo "cv" could then become problematic.
> algorithm tries to avoid generating most common English curse words by never placing the following letters (and their uppercase equivalents) next to each other:
> c, s, f, h, u, i, t
https://hashids.org/#how-does-it-work
E: ah it was already mentioned later on, hadn't got that deep into the comments yet!
Edit: But I'll concede that when your outputs are only four characters long and end users will actively interact with them (write them down, type them again later, etc.), additional safeguards might be appropriate. Or simply omit all alphas and use only numerics.
You're still not out of the park with numerics - people with 1313 or 6660 or 4444 or something will complain a lot. The possibility of a 666 in some new biometric government IDs in my country rose a massive stink from church...
Also, have a feelin you meant to do 1312. What’s the issue with 4444, though?
> When Beijing lost its bid to stage the 2000 Olympic Games, it was speculated that the reason China did not pursue a bid for the following 2004 Games was due to the unpopularity of the number 4 in China. Instead, the city waited another four years, and would eventually host the 2008 Olympic Games, the number eight being a lucky number in Chinese culture.
Thought this was particularly interesting.
> What’s the issue with 4444
4 is pronounced similar to "death" in sino-japanese languages and dialects.
Yeah. An important, long-lived ID that will stick with an individual for their entire life, and that they may want to commit to memory. That seems like a good time to take a hypersensitive approach and adopt some kind of filter.
That works pretty well until you realize that some numerical combinations are common neo-nazi codes and may lead to ... unfortunate associations. The ADL lists a few of those^1, but the list is by far not comprehensive, codes actually differ based on locality, and accidental combinatory collision in a 10-character space than it is in an alphanumerical 36-character space.
[1] https://www.adl.org/education/references/hate-symbols/88