lib/tapyrus/slip39/sss.rb in tapyrus-0.2.9 vs lib/tapyrus/slip39/sss.rb in tapyrus-0.2.10

- old
+ new

@@ -188,12 +188,18 @@ result = ('00' * shares.first[1].length).htb shares.each do |share| log_basis_eval = (log_prod - LOG_TABLE[share[0] ^ x] - shares.sum { |s| LOG_TABLE[share[0] ^ s[0]] }) % 255 result = - share[1].htb.bytes.each.map.with_index do |v, i| - (result[i].bti ^ (v == 0 ? 0 : (EXP_TABLE[(LOG_TABLE[v] + log_basis_eval) % 255]))).itb - end.join + share[1] + .htb + .bytes + .each + .map + .with_index do |v, i| + (result[i].bti ^ (v == 0 ? 0 : (EXP_TABLE[(LOG_TABLE[v] + log_basis_eval) % 255]))).itb + end + .join end result.bth end # Decrypt encrypted master secret using passphrase.