(v)
return (b'\0' * (origlen - newlen) + bseq(reversed(result)))
Decode a Base58 encoded string
Decode a Base58 encoded string
Decode a Base58 encoded string
def b58decode(v):
    '''Decode a Base58 encoded string'''

    v = scrub_input(v)

    origlen = len(v)
    v = v.lstrip(alphabet[0:1])
    newlen = len(v)

    acc = b58decode_int(v)

    result = []
    while acc > 0:
        acc, mod = divmod(acc, 256)
        result.append(mod)

    return (b'\0' * (origlen - newlen) + bseq(reversed(result)))
def b58decode ( v ) : v = scrub_input ( v ) origlen = len ( v ) v = v . lstrip ( alphabet [ 0 : 1 ] ) newlen = len ( v ) acc = b58decode_int ( v ) result = [ ] while acc > 0 : acc , mod = divmod ( acc , 256 ) result . append ( mod ) return ( b'\0' * ( origlen - newlen ) + bseq ( reversed ( result ) ) )