taylorfinnell / awscr-signer

AWS request signing in Crystal
MIT License
22 stars 15 forks source link

fixed deprecation warning 'use final.hexstring instead' #51

Closed chrisbirster closed 4 years ago

chrisbirster commented 4 years ago

I was using another library "awscr-s3" and created a simple app to list_buckets in s3:

require "dotenv"
require "awscr-s3"

Dotenv.load ".env"

AWS_KEY = ENV["AWS_KEY"]
AWS_SECRET = ENV["AWS_SECRET"]

client = Awscr::S3::Client.new("us-east-1", AWS_KEY, AWS_SECRET)
resp = client.list_buckets
p resp.buckets.map(&.name) 

I was getting a warning message below:

In /usr/share/crystal/src/digest/base.cr:143:5

 143 | digest.hexstring
       ^-----
Warning: Deprecated OpenSSL::Digest#digest. Use `final` instead.

I tracked it down to here and changed the digest.hexdigest to digest.final.hexstring and was able to stop the warning message.

taylorfinnell commented 4 years ago

Thank you :)