SkillAgentSearch skills...

Uuid64

This is a library generating unique id in short pattern.

Install / Use

/learn @heckpsi-lab/Uuid64
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

uuid64

This is a library generating unique id in short pattern.

  1. Generate a 64-bit encoded uuid in Ruby with length of 22.
  2. Generate a 16-bit encoded BSON object_id.
  3. Generate a 64-bit encoded BSON object_id with length of 16.

Status

Gem Version

Get Started

Install

gem install uuid64

Using Bundler

gem 'uuid64'

How To Use

require 'uuid64'
puts SecureRandom.uuid64 # "Ymu4xVZrRP29PPnixxwoPg"
puts SecureRandom.mongo_id # "57320baec9de9a14d2000000"
puts SecureRandom.mongo_id64 # "VzILtMnemhTSAAAD"

Known Issues

  • object_id and object_id64 may conflict when running on same process, multiple threads.
View on GitHub
GitHub Stars8
CategoryDevelopment
Updated2y ago
Forks2

Languages

Ruby

Security Score

70/100

Audited on Jan 16, 2024

No findings