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

When would you want to perform bitwise operations on a UUID?



A UUID is a bunch of bit fields packed together: the version/variant, and depending on the version, fields for the datetime, MAC address, node ID, etc. You'd use bit ops to both construct and extract the fields.


Say you need 5 UUIDs derived from one (say a primary key and some set of idempotency keys). You can mask them.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: