RubyGems Navigation menu

permalinkable 1.0.1

This is a gem originated from another gem called permalink. Since I often want a permalink that provides no way to tell the database ids, I came up with the idea about encrypting the id and prepending it to the permalink. For more information about FPE(Format Preserving Encryption), please consult the wikipedia. The encryption method of current release is simply RC4-40 with a configurable key. Note, RC4-40 is not a strong encryption algorithm at all, and you shouldn't rely on it to delivery sensitive information. Also, to prevent inconsistance of encryption, and duplication(although the chance is very low) you should keep your key as a secret and never change it. The original implementation of generating permalink involves a infite loop to check uniqueness in database. It's slow, inefficient and most importantly, it still can't prevent race condition. And since we are using a FPE algorithm on the database id, which is garanteed to be unique from database, we don't need to put ourselves in that inefficient loop. Finally, what's the purpose of this gem? It's only a gem that helps hiding your database ids.

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 1.0.1 - August 30, 2014 (10.5 KB)
  2. 0.1.0 - August 30, 2014 (9.5 KB)
显示所有版本 (共 3 个)

Runtime 依赖 (2):

activerecord ~> 4.0
hashie ~> 3.1

Development 依赖 (2):

rspec ~> 3.0
sqlite3 ~> 1.3

业主:

作者:

  • Yang Ou

SHA 256 校验和:

ed2ce188ae5ca8bbeb0195b1f576c26cf95f16880260fac6dcc9b464423e1570

下载总量 5,593

这个版本 3,277

许可:

MIT

需要的 Ruby 版本: >= 0

链接: