Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aravindavk/uuid_utils
UUID utilities to support V3, V4 and V5 - Crystal language
https://github.com/aravindavk/uuid_utils
crystal crystal-lang uuid uuidv3 uuidv4 uuidv5
Last synced: 11 days ago
JSON representation
UUID utilities to support V3, V4 and V5 - Crystal language
- Host: GitHub
- URL: https://github.com/aravindavk/uuid_utils
- Owner: aravindavk
- License: mit
- Created: 2023-03-13T13:12:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T15:39:44.000Z (almost 2 years ago)
- Last Synced: 2024-10-25T01:24:04.076Z (about 2 months ago)
- Topics: crystal, crystal-lang, uuid, uuidv3, uuidv4, uuidv5
- Language: Crystal
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UUID utilities to support v3, v4 and v5
**TODO**: v1 and v2 are not yet supported.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
uuid_utils:
github: aravindavk/uuid_utils
```2. Run `shards install`
## Usage
```crystal
require "uuid_utils"namespace = UUID.new("68ab717d-d847-4277-be1a-303be8ac3d97")
msg = "Hello World!"
puts UUID.uuid3(namespace, msg) # 33056d85-5061-31c8-9656-df07f3eec397# Same as UUID.random
puts UUID.uuid4 # 39e54402-44c6-42c6-be52-4bb9ab18a5faputs UUID.uuid5(namespace, msg) # 562ed049-5b55-582d-ba51-812a786927ca
```## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request## Contributors
- [Aravinda Vishwanathapura](https://github.com/aravindavk) - creator and maintainer