See the OpenSSL::HMAC documentation.
I am trying this:
require "openssl"
puts OpenSSL::HMAC.hexdigest(:sha256, "secret key", "data")
and I am getting this error:
undefined constant OpenSSL::HMAC
Other OpenSSL methods are working fine, like OpenSSL::Digest.new("SHA256")
.
What am I doing wrong?