I am using bin2hex to create unique id's for my users as an Identifier and I do开发者_如何学Pythonn't want to connect to MySQL for checking repetition .
If the string is unique, the hex will be too, because it has the same contents presented in different format. Note that the hex will generally be about twice as long as your input string, so there could be performance/storage issues if you have lots of longer strings.
精彩评论