<commit_before>GSSAPI="BASE"  # This ensures that a full module is generated by Cython

from gssapi.raw.cython_types cimport *
from gssapi.raw.cython_converters cimport c_make_oid
from gssapi.raw.oids cimport OID

from gssapi.raw._enum_extensions import ExtendableEnum

from enum import IntEnum
import collections
import copy
import numbers
import operator

from collections.abc import MutableSet


class NameType(object):
    """
    GSSAPI Name Types

    This enum-like object represents GSSAPI name
    types (to be used with :func:`import_name`, etc)
    """

    # mech-agnostic name types
    hostbased_service = c_make_oid(GSS_C_NT_HOSTBASED_SERVICE)
    # NB(directxman12): skip GSS_C_NT_HOSTBASED_SERVICE_X since it's deprecated
    user = c_make_oid(GSS_C_NT_USER_NAME)
    anonymous = c_make_oid(GSS_C_NT_ANONYMOUS)
    machine_uid = c_make_oid(GSS_C_NT_MACHINE_UID_NAME)
    string_uid = c_make_oid(GSS_C_NT_STRING_UID_NAME)
    export = c_make_oid(GSS_C_NT_EXPORT_NAME)

    # mech-specific name types are added automatically on import


class RequirementFlag(IntEnum, metaclass=ExtendableEnum):
    """
    GSSAPI Requirement Flags

    This :class:`~enum.IntEnum` represents flags used with the
    :class:`SecurityContext`-related methods (e.g.
    :func:`init_sec_context`)

    The numbers behind the values correspond directly
    to their C counterparts.
    """

    delegate_to_peer = GSS_C_DELEG_FLAG
    mutual_authentication = GSS_C_MUTUAL_FLAG
    replay_detection = GSS_C_REPLAY_FLAG
    out_of_sequence_detection = GSS_C_SEQUENCE_FLAG
    confidentiality = GSS_C_CONF_FLAG
    integrity = GSS_C_INTEG_FLAG
    anonymity = GSS_C_ANON_FLAG
    protection_ready = GSS_C_PROT_READY_FLAG
    transferable = GSS_C_TRANS_FLAG

    # GSS_C_DELEG_POLICY_FLAG.  cython can't do compile-time detection of
    # this, so take the value from RFC 5896.  Implementations that don't
    # support it will ignore it.
    ok_as_delegate = 32768


class AddressType(IntEnum, metaclass=ExtendableEnum):
    """
    GSSAPI Channel Bindings Address Types

    This :class:`~enum.IntEnum` represents the various address
    types used with the :class:`ChannelBindings` structure.

    The numbers behind the values correspond directly
    to their C counterparts.  There is no value for
    ``GSS_C_AF_UNSPEC``, since this is represented
    by ``None``.
    """

    # unspecified = GSS_C_AF_UNSPEC  # None --> GSS_C_AF_UNSPEC<commit_msg>Add support for GSS_C_CHANNEL_BOUND_FLAG<commit_after>GSSAPI="BASE"  # This ensures that a full module is generated by Cython

from gssapi.raw.cython_types cimport *
from gssapi.raw.cython_converters cimport c_make_oid
from gssapi.raw.oids cimport OID

from gssapi.raw._enum_extensions import ExtendableEnum

from enum import IntEnum
import collections
import copy
import numbers
import operator

from collections.abc import MutableSet


class NameType(object):
    """
    GSSAPI Name Types

    This enum-like object represents GSSAPI name
    types (to be used with :func:`import_name`, etc)
    """

    # mech-agnostic name types
    hostbased_service = c_make_oid(GSS_C_NT_HOSTBASED_SERVICE)
    # NB(directxman12): skip GSS_C_NT_HOSTBASED_SERVICE_X since it's deprecated
    user = c_make_oid(GSS_C_NT_USER_NAME)
    anonymous = c_make_oid(GSS_C_NT_ANONYMOUS)
    machine_uid = c_make_oid(GSS_C_NT_MACHINE_UID_NAME)
    string_uid = c_make_oid(GSS_C_NT_STRING_UID_NAME)
    export = c_make_oid(GSS_C_NT_EXPORT_NAME)

    # mech-specific name types are added automatically on import


class RequirementFlag(IntEnum, metaclass=ExtendableEnum):
    """
    GSSAPI Requirement Flags

    This :class:`~enum.IntEnum` represents flags used with the
    :class:`SecurityContext`-related methods (e.g.
    :func:`init_sec_context`)

    The numbers behind the values correspond directly
    to their C counterparts.
    """

    delegate_to_peer = GSS_C_DELEG_FLAG
    mutual_authentication = GSS_C_MUTUAL_FLAG
    replay_detection = GSS_C_REPLAY_FLAG
    out_of_sequence_detection = GSS_C_SEQUENCE_FLAG
    confidentiality = GSS_C_CONF_FLAG
    integrity = GSS_C_INTEG_FLAG
    anonymity = GSS_C_ANON_FLAG
    protection_ready = GSS_C_PROT_READY_FLAG
    transferable = GSS_C_TRANS_FLAG

    # GSS_C_DELEG_POLICY_FLAG.  cython can't do compile-time detection of
    # this, so take the value from RFC 5896.  Implementations that don't
    # support it will ignore it.
    ok_as_delegate = 32768

    # GSS_C_CHANNEL_BOUND_FLAG, implemented in MIT krb5-1.19
    # See draft-ietf-kitten-channel-bound-flag-04
    channel_bound = 2048


class AddressType(IntEnum, metaclass=ExtendableEnum):
    """
    GSSAPI Channel Bindings Address Types

    This :class:`~enum.IntEnum` represents the various address
    types used with the :class:`ChannelBindings` structure.

    The numbers behind the values correspond directly
    to their C counterparts.  There is no value for
    ``GSS_C_AF_UNSPEC``, since this is represented
    by ``None``.
    """

    # unspecified = GSS_C_AF_UNSPEC  # None --> GSS_C_AF_UNSPEC
{'fraction_non_alphanumeric': 0.06212900672734468, 'fraction_numerical': 0.006331618519984171, 'mean_word_length': 4.152905198776758, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5790578', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1705, 'n_words': 425}