
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Encode and decode UUIDs into any alphabet. Can either be used to improve space efficiency by using any alphabet with more than 16 characters, or any other alphabet for fun or profit.
The default alphabet is a URL safe base62, as defined by
DEFAULT_BASE62 = %w(0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z).freeze
irb(main):001:0> id = SecureRandom.uuid
=> "4890586e-32a5-4f9c-a000-2a2bb68eb1ce"
irb(main):003:0> short_id = ShortUUID.shorten id
=> "2CvPdpytrcURpSLoPxYb30"
irb(main):005:0> ShortUUID.expand short_id
=> "4890586e-32a5-4f9c-a000-2a2bb68eb1ce"
irb(main):007:0> vowel_id = ShortUUID.shorten id, "AEIOU".chars
=> "EOOIAUUEOUUIOIIEUUUAOOUIOOUUAOIIIEAUAOUAAAOEOOEOAUAUUEE"
irb(main):009:0> ShortUUID.expand vowel_id, "AEIOU".chars
=> "4890586e-32a5-4f9c-a000-2a2bb68eb1ce"
Add this line to your application's Gemfile:
gem 'shortuuid'
And then execute:
$ bundle
Or install it yourself as:
$ gem install shortuuid
Bug reports and pull requests are welcome on GitHub at https://github.com/sudhirj/shortuuid. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that shortuuid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.