Skip to content

Commit

Permalink
gems: bump keccak to 1.3.0 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
q9f authored Dec 1, 2021
1 parent 7c6185f commit 9e01ee3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.test_files = spec.files.grep %r{^(test|spec|features)/}

spec.add_dependency 'keccak', '~> 1.2'
spec.add_dependency 'keccak', '~> 1.3'
spec.add_dependency 'ffi', '~> 1.15'
spec.add_dependency 'money-tree', '~> 0.10'
spec.add_dependency 'rlp', '~> 0.7'
Expand Down
2 changes: 1 addition & 1 deletion lib/eth.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'digest/sha3'
require 'digest/keccak'
require 'ffi'
require 'money-tree'
require 'rlp'
Expand Down
5 changes: 2 additions & 3 deletions lib/eth/utils.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Eth
module Utils

extend self

def normalize_address(address)
Expand Down Expand Up @@ -66,11 +65,11 @@ def sha256(x)
end

def keccak256(x)
Digest::SHA3.new(256).digest(x)
Digest::Keccak.new(256).digest(x)
end

def keccak512(x)
Digest::SHA3.new(512).digest(x)
Digest::Keccak.new(512).digest(x)
end

def keccak256_rlp(x)
Expand Down

0 comments on commit 9e01ee3

Please sign in to comment.