neojsonrpc/utils.py
def is_hash160(s):
    """ Returns True if the considered string is a valid RIPEMD160 hash. """
    if not s or not isinstance(s, str):
        return False
    if not len(s) == 40:
        return False
    for c in s:
        if (c < '0' or c > '9') and (c < 'A' or c > 'F') and (c < 'a' or c > 'f'):
            return False
    return True
def is_hash160(s):
    if not s or not isinstance(s, str):
        return False
    if not len(s) == 40:
        return False
    for c in s:
        if (c < '0' or c > '9') and (c < 'A' or c > 'F') and (c < 'a' or c > 'f'):
            return False
    return True
def is_hash160 ( s ) : if not s or not isinstance ( s , str ) : return False if not len ( s ) == 40 : return False for c in s : if ( c < '0' or c > '9' ) and ( c < 'A' or c > 'F' ) and ( c < 'a' or c > 'f' ) : return False return True
Returns True if the considered string is a valid RIPEMD160 hash.
Returns True if the considered string is a valid RIPEMD160 hash .