import codecs


def bytes_to_str(b):
    """ Converts bytes into a hex-encoded string.

    Args:
        b (bytes): bytes to encode

    Returns:
        h (str): hex-encoded string corresponding to b.
    """
    return codecs.encode(b, 'hex_codec').decode('ascii')