Tech News
← Back to articles

UUIDv47: Store UUIDv7 in DB, emit UUIDv4 outside (SipHash-masked timestamp)

read original related products more articles

UUIDv47 - UUIDv7-in / UUIDv4-out (SipHash-masked timestamp)

uuidv47 lets you store sortable UUIDv7 in your database while emitting a UUIDv4-looking façade at your API boundary. It does this by XOR-masking only the UUIDv7 timestamp field with a keyed SipHash-2-4 stream tied to the UUID’s own random bits.

Header-only C (C89) · zero deps

Deterministic, invertible mapping (exact round-trip)

RFC-compatible version/variant bits (v7 in DB, v4 on the wire)

Key-recovery resistant (SipHash-2-4, 128-bit key)

Full tests provided

Table of contents

Why

Quick start

... continue reading