4 ms·
IMHO, in most cases you don't need performance nor "security", if you simply generate IDs for some documents in DB that generating ID is totally negligible in c
by exyi 8y ago
IMHO, in most cases you don't need performance nor "security", if you simply generate IDs for some documents in DB that generating ID is totally negligible in comparison with storing that on disk. In case it is a performance bottleneck you'll quickly find that out, it's probably very easy to get some flamegraph and see the crypto generator here. However, in case you need security, people quite likely to miss that out until something gets wrong...
It's certainly a compromise, but I like their choice
- wgj 8y agoWhat are you securing? It's a cryptographic hash of what?
- exyi 8y agoIt's not hash, you probably want to prevent bad guys from making you ID collisions.
- BugsJustFindMe 8y agoIt seems kinda like their way of saying "if your random sections collide, then you're boned", which of course isn't the same as what they said.