A simple SHA1 implementation for mruby.
require 'sha1'
digest = SHA1.digest("hello world")
puts digest.unpack1('H*') # prints "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed"- mruby
Add mruby-sha1 to your build_config.rb:
MRuby::Build.new do |conf|
conf.gem :github => 'mattn/mruby-sha1'
endThen run rake to build your mruby with the SHA1 gem included.
This project is licensed under a dual-licensing model:
- sha.c: Licensed under the GNU General Public License (GPL). See the file
sha.cfor details. - All other files: Licensed under the MIT License.
Yasuhiro Matsumoto (a.k.a. mattn)