2017-10-22 77 views

回答

3

With require "openssl"you don't require hmac。這適用於我:

require "openssl/hmac" 

puts OpenSSL::HMAC.hexdigest(:sha256, "secret key", "data")