digix-eth 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 861710a42df399aa56c12849aa8bddc34c026177
4
- data.tar.gz: 1138b8eb0192546ecb105f9565a506a86fac1bc7
3
+ metadata.gz: 5be7dffc1a811fbdc04ef6f2d3b7225846dc8878
4
+ data.tar.gz: 9a65fa1b1600a634f472b9e3352746cb0caff1b7
5
5
  SHA512:
6
- metadata.gz: 730cf54252f4bc86fd69e5f40ff81d423d036068193d4c6960e03903497129a08fde8befe4c9c4b7a9dfecb169a212cb3d4b80894e81927bbacbb397b1ac0201
7
- data.tar.gz: 3be0d1f603f981b47920ff09c5b4deb07d2ed146031c77cdf4afb28b4cd8cb07a490e4af26fdee473275682f2dab0eb4420e5758dadba0ae6403a7ee4d56289a
6
+ metadata.gz: c62931153bfd8e1f287a0534ff5144bb418ff15d0095e6f753bf652aaeb66fb9e3848a0ecadc941bc7c8cf22a11cacae3922811e6ec24f47c47d3d7c935aaf4e
7
+ data.tar.gz: fc12cc2637cc2ba44f10a94149101644d002baf6851021aacd9d80d23347a005e18cdd447d64c758f0b2f712cfcc98d4ff25a53b02593542ea22d622872355fc
@@ -10,9 +10,9 @@ module Eth
10
10
  def sign_message(message)
11
11
  payload = Eth::Signature.new(message)
12
12
  payload.signer = @key.address
13
- payload.prefixed_message = Eth::Utils.prefix_message(message)
14
- payload.hash = Eth::Utils.keccak256(payload.prefixed_message)
15
- payload.signature = @key.sign(payload.prefixed_message)
13
+ payload.padded_message = Eth::Utils.prefix_message(message)
14
+ payload.hash = Eth::Utils.keccak256(payload.padded_message)
15
+ payload.signature = @key.sign_hash(payload.hash)
16
16
  payload.v, payload.r, payload.s = Eth::Utils.v_r_s_for(payload.signature)
17
17
  payload.rpc_signature = Eth::Utils.zpad_int(payload.r, 32) + Eth::Utils.zpad_int(payload.s, 32) + [(payload.v - 27)].pack('C')
18
18
  return payload
@@ -31,7 +31,7 @@ module Eth
31
31
 
32
32
  attr_accessor :message,
33
33
  :signer,
34
- :prefixed_message,
34
+ :padded_message,
35
35
  :hash,
36
36
  :signature,
37
37
  :rpc_signature,
@@ -1,3 +1,3 @@
1
1
  module Eth
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digix-eth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Ellis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-07-17 00:00:00.000000000 Z
12
+ date: 2017-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: digest-sha3