My idea was to make this as close as possible to the original cuid2. I don’t have enough experience to criticize cuid2. I tried to follow the original code, even the counter. cuid2 is only valid if it starts with a letter, so I used Enum.random for that. I didn’t know another way.
I didn’t trust in :crypto.strong_rand_bytes/1 for all ID generation. I’m not sure how it works under the hood. I’ll check it.
Sorry for my b2 english.






















