Fixes to use OpenSSL::Digest.

OpenSSL::Digest::Digest has been discouraged to be used since ruby 1.8.7
(https://github.com/ruby/ruby/blob/ruby_1_8_7/ext/openssl/lib/openssl/digest.rb#L51).

And now it's deprecated (https://github.com/ruby/ruby/pull/446).