RubyGems Navigation menu

id_shuffler 0.0.8

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.

Gemfile:
= 複製 已複製

安裝:
=

版本列表:

  1. 0.0.8 - June 12, 2013 (9.5 KB)
  2. 0.0.6 - June 07, 2013 (7.0 KB)
  3. 0.0.5 - June 07, 2013 (7.0 KB)
  4. 0.0.4 - June 07, 2013 (7.0 KB)
  5. 0.0.3 - April 02, 2013 (6.5 KB)
顯示所有版本(共 8)

擁有者:

作者:

  • Josh Whiting

SHA 256 checksum:

051dd0623bd0f7350bfd28bb2fc431b4b020ca503ad877523ed3f5ce86c6c819

總下載次數 23,811

這個版本 4,160

License:

MIT

Ruby 版本需求:

相關連結: