BETAmodules.com is in beta — open to partnerships & joint ventures.Build with us

id_shuffler

v0.0.8RubyGems· Ruby

An efficient solution to use when it is undesirable to expose internal database ids, IdShuffler converts integers like 123 into strings like 'q34nr1', and vice-versa, using a very lightweight integer scrambling algorithm plus 'Crockford 32' encoding. It is built as a native C extension and so is very fast. The algorithm takes a string key as a seed, so you can use different keys for different id spaces and thus obtain different slugs for the same initial integer. This is not a security solution and I am not a cryptographer; it should be assumed a determined individual can unshuffle the ids without knowing the key used to generate them. Also note these are 30-bit ids, so the library can only represent values up to approximately 1 billion (1,073,741,823). This gem is still under development in so far as I have not written tests or documentation for it.

The verdict
Abandoned. Last published 12 years ago. No recent activity — look for a maintained alternative.
No recent activity — look for a maintained alternative.
Live from the RubyGems registry · derived rules, not AI
How it scores
MaintenanceAbandoned
PopularityNiche
SecurityClean
LicensePermissive
DepsZero deps
Maintenance
Last published 12 years ago.
Popularity
7 downloads / week
Security
No known advisories for this version (OSV).
License
MIT
Dependencies
No runtime dependencies
Recent releases
  • 0.0.812 years ago
  • 0.0.612 years ago
  • 0.0.512 years ago
  • 0.0.412 years ago
  • 0.0.313 years ago
  • 0.0.213 years ago
  • 0.0.113 years ago
  • 0.0.013 years ago
id_shuffler — An efficient solution to use when it is undesirable to expose internal database ids, IdShuffler converts integers like 123 into strings like 'q34nr1', and vice-versa, using a very lightweight integer scrambling algorithm plus 'Crockford 32' encoding. It is built as a native C extension and so is very fast. The algorithm takes a string key as a seed, so you can use different keys for different id spaces and thus obtain different slugs for the same initial integer. This is not a security solution and I am not a cryptographer; it should be assumed a determined individual can unshuffle the ids without knowing the key used to generate them. Also note these are 30-bit ids, so the library can only represent values up to approximately 1 billion (1,073,741,823). This gem is still under development in so far as I have not written tests or documentation for it. (Ruby / RubyGems) · Modules