杜克普
该库使用每个事务派生唯一密钥(DUKPT)方案为源自设备的密文实现解密器。
安装
将此行添加到您的应用程序的Gemfile中:
gem 'dukpt'
然后执行:
$ bundle
或将其自己安装为:
$ gem install dukpt
用法
# Instantiate a decrypter with your base derivation key (BDK)
decrypter = DUKPT::Decrypter.new("0123456789ABCDEFFEDCBA9876543210")
# You can specify whether you want to use "ecb" cipher mode if needed. The default is "cbc".
decrypter = DUKPT::Decrypter.new("0123456789A