Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 6.0% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 2.9% dependent repos on proxy.golang.org
Top 8.2% forks on proxy.golang.org

proxy.golang.org : github.com/agext/uuid

Package uuid implements generation and manipulation of UUIDs (v1 defined in RFC 4122). Version 1 UUIDs are time-based and include a node identifier that can be a MAC address or a random 48-bit value. This package uses the random approach for the node identifier, setting both the 'multicast' and 'local' bits to make sure the value cannot be confused with a real IEEE 802 address (see section 4.5 of RFC 4122). The initial node identifier is a cryptographic-quality random 46-bit value. The first 30 bits can be set and retrieved with the `SetNodeId` and `NodeId` functions and method, so that they can be used as a hard-coded instance id. The remaining 16 bits are reserved for increasing the randomness of the UUIDs and to avoid collisions on clock sequence rollovers. The basic generator `New` increments the clock sequence on every call and when the counter rolls over the last 16 bits of the node identifier are regenerated using a PRNG seeded at init()-time with the initial node identifier. This approach sacrifices cryptographic quality for speed and for avoiding depletion of the OS entropy pool (yes, it can and does happen). The `NewCrypto` generator replaces the clock sequence and last 16 bits of the node identifier on each call with cryptographic-quality random values.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/agext/uuid
Keywords: awesome-go, cryptographic-random-uuid, guid, manipulating-uuids, uuid, uuid-generator, uuid1
License: Apache-2.0
Latest release: over 5 years ago
First release: over 7 years ago
Namespace: github.com/agext
Dependent packages: 2
Dependent repositories: 3
Stars: 15 on GitHub
Forks: 5 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 7 hours ago

    Loading...
    Readme
    Loading...