def is_hash(fhash):
    """Returns true for valid hashes, false for invalid."""

    # Intentionally doing if/else statement for ease of testing and reading
    if re.match(re_md5, fhash):
        return True
    elif re.match(re_sha1, fhash):
        return True
    elif re.match(re_sha256, fhash):
        return True
    elif re.match(re_sha512, fhash):
        return True
    elif re.match(re_ssdeep, fhash):
        return True
    else:
        return False
Returns true for valid hashes, false for invalid.