lib/vidibus/secure.rb in vidibus-secure-0.2.0 vs lib/vidibus/secure.rb in vidibus-secure-0.3.0

- old
+ new

@@ -35,10 +35,10 @@ # Returns signature of given data with given key. def sign(data, key, options = {}) raise KeyError.new("Please provide a secret key to sign data with.") unless key options = settings[:sign].merge(options) - digest = OpenSSL::Digest::Digest.new(options[:algorithm]) + digest = OpenSSL::Digest.new(options[:algorithm]) signature = OpenSSL::HMAC.digest(digest, key, data) encode(signature, options) end # Encrypts given data with given key.