Hi, do you have any good idea on how to generate s...
# getting-started
a
Hi, do you have any good idea on how to generate secure random IDs ? For a project I need to have IDs for objects, the first digits will be the actual timestamp but then I need at least 5 numbers that should never be the same even in the same millisecond I don't want a super-secure thing, it's just for a personal project with my friends but at least an interesting and important tech to use in development like uuids (so it could be useful for me for future jobs I guess).
d
if you are on JVM then just use Java
SecureRandom
-> https://github.com/Kotlin/KEEP/issues/184
a
it's for a #compose app that will also be for web and mobile
h
Alternative use an UUID
☝️ 3
d
I don't think UUID is "secure random"
g
UUIDs are using secure random, they’re a strong option under the JVM for unique IDs
👍 4
t
You may also look into Twitter's (deprecated) Snowflake IDs, although they are not exactly random.