Hacker News new | past | comments | ask | show | jobs | submit login

Great point, using a u16 is probably the best choice then. As it give locality within 65.53600 seconds (roughly a minute) without exposing sensitive timing information, and should cover most real world write scenarios.



A small additional improvement might be to also create a random 16bit salt at startup and then xor the timestamp with that, to leak even less information. That way entries will still have locality without leaking ms timestamp info.


at this point, why not use the creation date (with all that you describe on top) as the primary component of the primary key?


you only got 128bit, you want most of that to be randomnes, otherwise collisions are much more likely




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: