lib/platon/bech32.rb
def create_checksum(hrp, data, spec)
    values = expand_hrp(hrp) + data
    const = (spec == Bech32::Encoding::BECH32M ? Bech32::BECH32M_CONST : 1)
    polymod = polymod(values + [0, 0, 0, 0, 0, 0]) ^ const
    (0..5).map{|i|(polymod >> 5 * (5 - i)) & 31}
  end
# Returns computed checksum values of +hrp+ and +data+
Returns computed checksum values of +hrp+ and +data+
Returns computed checksum values of + hrp + and + data +
def create_checksum(hrp, data, spec)
    values = expand_hrp(hrp) + data
    const = (spec == Bech32::Encoding::BECH32M ? Bech32::BECH32M_CONST : 1)
    polymod = polymod(values + [0, 0, 0, 0, 0, 0]) ^ const
    (0..5).map{|i|(polymod >> 5 * (5 - i)) & 31}
  end
def create_checksum ( hrp , data , spec ) values = expand_hrp ( hrp ) + data const = ( spec == Bech32 :: Encoding :: BECH32M ? Bech32 :: BECH32M_CONST : 1 ) polymod = polymod ( values + [ 0 , 0 , 0 , 0 , 0 , 0 ] ) ^ const ( 0 .. 5 ) . map { | i | ( polymod >> 5 * ( 5 - i ) ) & 31 } end
Returns computed checksum values of +hrp+ and +data+
Returns computed checksum values of + hrp + and + data +
hrp
data
spec