
    WwgP              	          d Z dgZddlZddlZddlmZmZ ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  f	Zd	dededefdZy)
z&An implementation of RFC4013 SASLprep.saslprep    N)CallableIterabledataprohibit_unassigned_code_pointsreturnc                    |rt         t        j                  fz   }nt         }t        j                  }t        j                  }dj                  | D cg c]  } ||      s ||      rdn| c}      } t        j                  j                  d|       } t        j                  } || d         r+ || d         st        d      |t        j                  fz   }n||fz   }| D ]!  t        fd|D              st        d       | S c c}w )	a  An implementation of RFC4013 SASLprep.

    :param data:
        The string to SASLprep.
    :param prohibit_unassigned_code_points:
        RFC 3454 and RFCs for various SASL mechanisms distinguish between
        `queries` (unassigned code points allowed) and
        `stored strings` (unassigned code points prohibited). Defaults
        to ``True`` (unassigned code points are prohibited).

    :return: The SASLprep'ed version of `data`.
      NFKCr   z$SASLprep: failed bidirectional checkc              3   .   K   | ]  } |        y w)N ).0in_tablechars     X/var/www/horilla/myenv/lib/python3.12/site-packages/pyhanko/pdf_utils/crypt/_saslprep.py	<genexpr>zsaslprep.<locals>.<genexpr>c   s     9(x~9s   z+SASLprep: failed prohibited character check)_PROHIBITED
stringprepin_table_a1in_table_c12in_table_b1joinunicodedata	ucd_3_2_0	normalizein_table_d1
ValueErrorin_table_d2any)r   r   
prohibitedr   r   eltr   r   s          @r   r   r   ,   s    ' J$:$:#<<
 
 **L((K77 	
s# %S)Hs2	
D   **648D((K4748$ CDD  :#9#9";;

  ;.0
  L9j99JKKL KA	
s   D)T)__doc____all__r   r   typingr   r   r   in_table_c21_c22in_table_c3in_table_c4in_table_c5in_table_c6in_table_c7in_table_c8in_table_c9r   strboolr   r       r   <module>r2      s   & -,   %  :3 : : :r1   