baarde / uuid-kit Goto Github PK
View Code? Open in Web Editor NEWSwift library for generating and working with UUIDs
License: MIT License
Swift library for generating and working with UUIDs
License: MIT License
Does anyone need support for DCE Security (version 2) UUIDs? Probably not.
Using the Ethernet address in time-based (version 1) UUIDs has several caveats:
ac:de:48:00:11:22
.02:42:ac:11:00:00
โ02:42:ac:11:ff:ff
.We already use a random node identifier as a fallback when the Ethernet address cannot be determined, as specified in RFC 4122 section 4.5. I suggest we make using that random identifier the default choice for UUID.v1
.
UUID.UUIDv1
, UUID.Timestamp
, UUID.ClockSequence
and UUID.NodeID
are currently implementation details of the UUID.v1()
method (I originally intended .v1()
to just be a wrapper around uuid_generate_time()
but I wasn't satisfied with the implementation in swift-corelibs-foundation).
Some developers might want to inspect time-based (version 1) UUIDs or generate UUIDs with custom node IDs (or timestamps), which is why I plan to make these types public in a future release.
However I first need to make sure that the APIs are good enough that I won't have to change them and break existing code in the near future. Also I have to write the corresponding docs.
Feel free to comment if you see anything that should change before I do.
There exists a proposal for "Version 6" UUIDs.
They are similar to RFC4122's time-based (version 1) UUIDs but the timestamp's bits are stored in standard byte order which make the UUIDs sortable using lexicographic order.
uuid v1: 9850ee54-fc18-11ea-adc1-0242ac120002
zzzzzzzz yyyy 1xxx
uuid v6: 1eafc189-850e-6e54-adc1-0242ac120002
xxxyyyyz zzzz 6zzz
Should we wait for the proposal to be accepted before implementing it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.