-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Description
Hello,
I discovered cuid2 (and cuid) today, and I gave a try at porting it to Go: https://github.com/nlepage/go-cuid2
It seems to be working fine, here are some ids generated with default length:
mhsx3pf2p8ocd2nlaioilwah
jt06wcr8l51t7wj9bxsdb0al
fvqdusrnkcohfi68gor7pooa
sdgqj4r3j0om523ykm0nch85
qw60k14c0kq14gnqjis8nh9f
I have some questions:
- In
createEntropy(), I'm calling a random prime number generator from the Go std library instead of picking in a predefined list of prime numbers- is ot OK?
- isn't it too expensive? an alternative could be to generate a random prime numbers list once, then pick in this list when
createEntropy()is called
- In
createFingerprint(), I don't have an equivalent ofObject.keys(globalObj).toString())to give to thehashfunction, is it a problem?
Thanks for your help!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels