import binascii


def encode_to_base64(content):
    """
    Calculate base64 of input byte array.

    :param content: Input byte array.
    :return: base64 encoding of input byte array.
    """
    return binascii.b2a_base64(content).strip().decode('utf-8')