oss_server/explorer/blocktools/base58.py
def b58decode(v, length):
    """Decode v into a string of len bytes."""

    long_value = 0L
    for (i, c) in enumerate(v[::-1]):
        long_value += __b58chars.find(c) * (__b58base**i)

    result = ''
    while long_value >= 256:
        div, mod = divmod(long_value, 256)
        result = chr(mod) + result
        long_value = div
    result = chr(long_value) + result

    nPad = 0
    for c in v:
        if c == __b58chars[0]:
            nPad += 1
        else:
            break

    result = chr(0) * nPad + result
    if length is not None and len(result) != length:
        return None

    return result
Decode v into a string of len bytes.
Decode v into a string of len bytes.
Decode v into a string of len bytes .
def b58decode(v, length):
    long_value = 0L
    for (i, c) in enumerate(v[::-1]):
        long_value += __b58chars.find(c) * (__b58base**i)
    result = ''
    while long_value >= 256:
        div, mod = divmod(long_value, 256)
        result = chr(mod) + result
        long_value = div
    result = chr(long_value) + result
    nPad = 0
    for c in v:
        if c == __b58chars[0]:
            nPad += 1
        else:
            break
    result = chr(0) * nPad + result
    if length is not None and len(result) != length:
        return None
    return result
def b58decode ( v , length ) : long_value = 0L for ( i , c ) in enumerate ( v [ : : - 1 ] ) : long_value += __b58chars . find ( c ) * ( __b58base ** i ) result = '' while long_value >= 256 : div , mod = divmod ( long_value , 256 ) result = chr ( mod ) + result long_value = div result = chr ( long_value ) + result nPad = 0 for c in v : if c == __b58chars [ 0 ] : nPad += 1 else : break result = chr ( 0 ) * nPad + result if length is not None and len ( result ) != length : return None return result
Decode v into a string of len bytes.
Decode v into a string of len bytes .
"""Decode v into a string of len bytes."""
v
length