import binascii


def bin2base64(bin_str: bytes) -> bytes:
    """Convert bytes to base64.

    Keyword arguments:
    bin_str -- Ascii string representation as bytes

    Returns:
    Base 64 representation as bytes

    """
    return binascii.b2a_base64(bin_str)