Provide PKCS5 functionality with mruby-digest
Add this line to build_config.rb
MRuby::Build.new do |conf|
conf.gem github: 'hanachin/mruby-pkcs5'
end
or add this line to your aplication's mrbgem.rake
MRuby::Gem::Specification.new('your-mrbgem') do |spec|
spec.add_dependency 'mruby-pkcs5', github: 'hanachin/mruby-pkcs5'
end
p = 'password'
s = 'salt'
c = 1
dk_len = 20
digest = Digest::SHA1
PKCS5.pbkdf2_hmac(p, s, c, dk_len, digest)
$ git clone https://github.com/hanachin/mruby-pkcs5.git
$ cd mruby-pkcs5
$ ./test.sh
MIT