lib/platon/bech32.rb
def verify_checksum(hrp, data)
    const = polymod(expand_hrp(hrp) + data)
    case const
    when 1
      Encoding::BECH32
    when BECH32M_CONST
      Encoding::BECH32M
    end
  end
# Verify a checksum given Bech32 string
# @param [String] hrp hrp part.
# @param [Array[Integer]] data data array.
# @return [Integer] spec
Verify a checksum given Bech32 string
Verify a checksum given Bech32 string
def verify_checksum(hrp, data)
    const = polymod(expand_hrp(hrp) + data)
    case const
    when 1
      Encoding::BECH32
    when BECH32M_CONST
      Encoding::BECH32M
    end
  end
def verify_checksum ( hrp , data ) const = polymod ( expand_hrp ( hrp ) + data ) case const when 1 Encoding :: BECH32 when BECH32M_CONST Encoding :: BECH32M end end
Verify a checksum given Bech32 string
Verify a checksum given Bech32 string
None
Integer
hrp
data
hrp hrp part.
hrp hrp part .
]
data data array.
data data array .