Skip to content

Commit

Permalink
Merge pull request #40 from marzhaev/crystal-0.28.0
Browse files Browse the repository at this point in the history
Further to a breaking change in Crystal 0.28.0
  • Loading branch information
taylorfinnell authored Apr 28, 2019
2 parents 431458b + 0b7bf4b commit e7286e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: awscr-signer
version: 0.5.3
crystal: 0.27.0
crystal: 0.28.0

authors:
- Taylor Finnell <tmfinnell@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion spec/awscr-signer/core/hmac_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Awscr
module Signer
describe HMAC do
it "can support other alogs" do
HMAC.hexdigest("test", "test", :sha1).should eq("0c94515c15e5095b8a87a50ba0df3bf38ed05fe6")
HMAC.hexdigest("test", "test", OpenSSL::Algorithm::SHA1).should eq("0c94515c15e5095b8a87a50ba0df3bf38ed05fe6")
end

it "can compute digests" do
Expand Down
4 changes: 2 additions & 2 deletions src/awscr-signer/core/hmac.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ module Awscr
class HMAC
INSTANCE = HMAC.new

def self.digest(key : (String | Slice(UInt8)), data : String, algorithm : OpenSSL::Algorithm = :sha256)
def self.digest(key : (String | Slice(UInt8)), data : String, algorithm : OpenSSL::Algorithm = OpenSSL::Algorithm::SHA256)
INSTANCE.digest(key, data, algorithm)
end

def self.hexdigest(key : (String | Slice(UInt8)), data : String, algorithm : OpenSSL::Algorithm = :sha256)
def self.hexdigest(key : (String | Slice(UInt8)), data : String, algorithm : OpenSSL::Algorithm = OpenSSL::Algorithm::SHA256)
INSTANCE.hexdigest(key, data, algorithm)
end

Expand Down

0 comments on commit e7286e1

Please sign in to comment.