def to_entropy(words)
      word_master = load_words
      mnemonic = words.map do |w|
        index = word_master.index(w.downcase)
        raise IndexError, 'word not found in words list.' unless index
        index.to_s(2).rjust(11, '0')
      end.join
      entropy = mnemonic.slice(0, (mnemonic.length * 32) / 33)
      checksum = mnemonic.gsub(entropy, '')
      raise SecurityError, 'checksum mismatch.' unless checksum == checksum(entropy)
      [entropy].pack('B*').bth
    end
def to_entropy(words)
      word_master = load_words
      mnemonic = words.map do |w|
        index = word_master.index(w.downcase)
        raise IndexError, 'word not found in words list.' unless index
        index.to_s(2).rjust(11, '0')
      end.join
      entropy = mnemonic.slice(0, (mnemonic.length * 32) / 33)
      checksum = mnemonic.gsub(entropy, '')
      raise SecurityError, 'checksum mismatch.' unless checksum == checksum(entropy)
      [entropy].pack('B*').bth
    end
generate entropy from mnemonic word
 @param [Array[String]] words the array of mnemonic word.
 @return [String] an entropy with hex format.