diff --git a/lib/signature.rb b/lib/signature.rb index 319aafc..48777bf 100644 --- a/lib/signature.rb +++ b/lib/signature.rb @@ -90,13 +90,10 @@ def auth_hash private def signature(token) + digest = OpenSSL::Digest::SHA256.new OpenSSL::HMAC.hexdigest(digest, token.secret, string_to_sign) end - def digest - OpenSSL::Digest::Digest.new('sha256') - end - def string_to_sign [@method, @path, parameter_string].join("\n") end