News for hackers. Stuff that matters.
Re:New UUID Formats by evil-olive on Sunday June 12, 2022 @07:58PM (#31719428)
my personal favorite UUID replacement, when not concerned with external compatibility or standards-compliance: a 96-bit random value, base64-urlsafe encoded to 16 ASCII characters

    >>> import secrets
    >>> secrets.token_urlsafe(12)
    'uUBpBk2eENDslHyw'
with UUID, you can store it as a compact 16 bytes in a database, but it needs 36 characters if you want to embed it in a URL or a JSON payload. and there's a temptation to be "clever" and strip out the hyphens to shave off 4 bytes and create a nonstandard UUID format. by comparison these have one single canonical representation that is always a 16-character URL-safe string.
Re:New UUID Formats by tehlike on Sunday June 12, 2022 @10:03PM (#31720185)
uuid is just what you said - 16bytes. you could presumably base64 that too...
Re:New UUID Formats by dagss on Monday June 13, 2022 @05:01AM (#31722908)
This proposal was 12 bytes and the feature that it is 16 chars in base64. UUID is more than 16 chars in base64.