Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Uid] add AbstractUid and interop with base-58/32/RFC4122 encodings #36074
This PR provides a base
It adds new methods that provide interoperability between all types of UIDs but also between different encodings of UIDs:
This adds to
I don't know the future plans of this component (will we keep adding other popular UIDs?) but this doesn't look future-proof to me. Any method that we add here could look outdated or unused in other future UID generators.
This reminds me to the
All serious id schemes use 128-bit identifiers, which is wide enough to deal with any use cases for the foreseeable future. Then, base58, base32, uuid-format are 3 widely used representation of 128-bit numbers. They fit various needs: 58 bit for compactness, 32 bit for case insensitivity, uuid-format for interop with e.g. DB storages.
My opinion is that all three of them are generic enough to land in the component.
Your comparison with salted-encoders is good: we did add them to the component because that's what ppl were widely using at the time. We don't know the future but we know these encoding schemes are widely used and have good reasons to remain so.
This PR was merged into the 5.1-dev branch. Discussion ---------- [UID] remove unused property | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | | License | MIT | Doc PR | leftover from #36074 Commits ------- 901e62a remove unused uuid property