ruby-id-cipher:用于将整数加密为另一个整数

时间:2021-06-22 18:47:58
【文件属性】:
文件名称:ruby-id-cipher:用于将整数加密为另一个整数
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-22 18:47:58
Ruby 身份密码 cipher Integer 到另一个 Integer,使客户与实数混淆 安装 将此行添加到应用程序的 Gemfile 中: gem 'id_cipher' 然后执行: $ bundle 或者自己安装: $ gem install id_cipher 用法 以两种方式设置密码板条: 如果在 ruby​​ on rails 中使用它,请在settings.yml添加配置: Settings.id_cipher_key = 'something.like.this' 或直接设置 IdCipher::KEY module IdCipher KEY = 'something.like.this' end 注意:密钥长度必须大于16,不能超过256。 代码示例 IdCipher.encrypt(1) # puts 42491238512 IdCipher
【文件预览】:
ruby-id-cipher-master
----Rakefile(29B)
----Gemfile(94B)
----spec()
--------id_cipher_spec.rb(518B)
----.gitignore(185B)
----lib()
--------id_cipher.rb(1KB)
----README.md(1KB)
----LICENSE.txt(1KB)
----id_cipher.gemspec(932B)

网友评论