If you really want to avoid any potential similarities, your character option of A-Z and 0-9 is even more limited to "abdfhjkprstuvwxyzACGHJKLMNPQRVWXY3469", according to this research: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3541865/
It's not strictly necessary to remove all the similar characters, as you can treat any of the similar inputs as being the same. eg. you could include 8 or B in the output, as long as you accepted 8 and B as being the same character you chose for output at input.
If you want to avoid the possibility of accidental profanity in your "random" strings, it is definitely worthwhile removing the vowels, although that may not apply to other languages than English!
Which is why I only mentioned lowercase l. 1 in some (especially serif) fonts looks like l and in some others (especially sans serif) like I. Definitely not okay in general.
This post is in the context of a PostgreSQL stored procedure. If you have ready access to a block cipher, you could use one with an appropriate block size; e.g., 32-bit RC5 for coupon codes, 128-bit AES for activation keys, or 64-bit Blowfish for something in between.
10 comments
[ 3.1 ms ] story [ 31.1 ms ] threadIf you want to avoid the possibility of accidental profanity in your "random" strings, it is definitely worthwhile removing the vowels, although that may not apply to other languages than English!