Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agext/uuid
Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier.
https://github.com/agext/uuid
awesome-go cryptographic-random-uuid guid manipulating-uuids uuid uuid-generator uuid1
Last synced: about 1 month ago
JSON representation
Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier.
- Host: GitHub
- URL: https://github.com/agext/uuid
- Owner: agext
- License: apache-2.0
- Created: 2016-02-03T03:02:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-12T22:02:03.000Z (about 4 years ago)
- Last Synced: 2024-01-31T22:09:50.282Z (4 months ago)
- Topics: awesome-go, cryptographic-random-uuid, guid, manipulating-uuids, uuid, uuid-generator, uuid1
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 18
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go-extra - uuid - quality random node identifier.|14|5|0|2016-02-03T03:02:51Z|2020-03-12T22:02:03Z| (UUID / Fail injection)
- awesome-go-cn - uuid
- awesome-go-zh - uuid
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go-cn - uuid
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go-projects - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go - uuid - quality random node identifier. | - | - | - | (UUID / HTTP Clients)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (Miscellaneous / Advanced Console UIs)
- awesome-go-with-framework - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go-stars - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go-cn - uuid
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go-cn - uuid
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go. - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (Miscellaneous / Advanced Console UIs)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (<span id="其他-miscellaneous">其他 Miscellaneous</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-cn - uuid - 生成,编解码 UUIDs v1 ,具有快速的或或密钥级随机节点标识 (杂项 / 高级控制台界面)
- awesome-go-with-stars - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- repo-1316-awesome-go-cn - uuid
- repo-1211-awesome-go-cn - uuid
- awesome-Char - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-reader - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- Go-awesome - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (Miscellaneous / Advanced Console UIs)
- awesome-go-zh - uuid
- awesome-go-handwritten - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (Miscellaneous / Advanced Console UIs)
- awesome-go - uuid - 生成,編解碼 UUIDs v1 ,具有快速的或或密鑰級隨機節點標識 (雜項 / 高級控制台界面)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. - :arrow_down:0 - :star:0 (UUID / HTTP Clients)
- awesome-go2 - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (Miscellaneous / Advanced Console UIs)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / HTTP Clients)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. (UUID / Utility/Miscellaneous)
- awesome-go-cn - uuid - quality random node identifier.) (杂项 / Advanced Console UIs)
- awesome-go - uuid - Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier. - ★ 6 (Miscellaneous)
README
# A Go package for generating and manipulating UUIDs
[![Release](https://img.shields.io/github/release/agext/uuid.svg?style=flat)](https://github.com/agext/uuid/releases/latest)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/agext/uuid)
[![Build Status](https://travis-ci.org/agext/uuid.svg?branch=master&style=flat)](https://travis-ci.org/agext/uuid)
[![Coverage Status](https://coveralls.io/repos/github/agext/uuid/badge.svg?style=flat)](https://coveralls.io/github/agext/uuid)
[![Go Report Card](https://goreportcard.com/badge/github.com/agext/uuid?style=flat)](https://goreportcard.com/report/github.com/agext/uuid)Generate, encode, and decode UUIDs v1, as defined in [RFC 4122](http://www.ietf.org/rfc/rfc4122.txt), in [Go](http://golang.org).
## Project Status
v1.1.0 Stable: Guaranteed no breaking changes to the API in future v1.x releases. Probably safe to use in production, though provided on "AS IS" basis.
This package is being actively maintained. If you encounter any problems or have any suggestions for improvement, please [open an issue](https://github.com/agext/uuid/issues). Pull requests are welcome.
## Overview
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.
## Installation
```
go get github.com/agext/uuid
```## License
Package uuid is released under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.