def exportName(name):
    """
    Exports a GSSAPI Mechanism Name

    This method "produces a canonical contiguous string representation
    of a mechanism name, suitable for direct comparison for use in
    authorization functions".  The input name must be a valid
    GSSAPI mechanism name, as generated by acceptSecContext or
    canonicalizeName.

    .. note::

       A mechanism name does not, in fact, refer to the name of a
       mechanism.  Instead, it refers to a canonicalized name,
       such as the initiator name returned by acceptSecContext

    :param name: a valid GSSAPI mechanism name
    :returns: a string version of the mechanism name
    :rtype: bytes
    :except GSSError:
    """
