Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Util/__pycache__/strxor.cpython-311.pyc



]jATddlmZmZmZmZmZmZeddZddZddZ	dZ
dS)	)load_pycryptodome_raw_libc_size_tcreate_string_bufferget_raw_bufferc_uint8_ptris_writeable_bufferzCrypto.Util._strxoray
                    void strxor(const uint8_t *in1,
                                const uint8_t *in2,
                                uint8_t *out, size_t len);
                    void strxor_c(const uint8_t *in,
                                  uint8_t c,
                                  uint8_t *out,
                                  size_t len);
                    Nc
>t|t|krtd|tt|}n_|}t|st	dt|t|krtdt|zt
t|t|t|tt||t|SdS)aFrom two byte strings of equal length,
    create a third one which is the byte-by-byte XOR of the two.

    Args:
      term1 (bytes/bytearray/memoryview):
        The first byte string to XOR.
      term2 (bytes/bytearray/memoryview):
        The second byte string to XOR.
      output (bytearray/memoryview):
        The location where the result will be written to.
        It must have the same length as ``term1`` and ``term2``.
        If ``None``, the result is returned.
    :Return:
        If ``output`` is ``None``, a new byte string with the result.
        Otherwise ``None``.

    .. note::
        ``term1`` and ``term2`` must have the same length.
    z.Only byte strings of equal length can be xoredN4output must be a bytearray or a writeable memoryview9output must have the same length as the input  (%d bytes))
len
ValueErrorrr	TypeError_raw_strxorstrxorrrr)term1term2outputresults    t/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Util/strxor.pyrr0s*5zzSZZIJJJ
~%c%jj11"6**	TRSSSu::V$$,.1%jj9::
:{5))"5))"6**E

++---
~f%%%tc
d|cxkrdksntd|tt|}n_|}t|st	dt|t|krtdt|zt
t||t|tt||t|SdS)a~From a byte string, create a second one of equal length
    where each byte is XOR-red with the same value.

    Args:
      term(bytes/bytearray/memoryview):
        The byte string to XOR.
      c (int):
        Every byte in the string will be XOR-ed with this value.
        It must be between 0 and 255 (included).
      output (None or bytearray/memoryview):
        The location where the result will be written to.
        It must have the same length as ``term``.
        If ``None``, the result is returned.

    Return:
        If ``output`` is ``None``, a new ``bytes`` string with the result.
        Otherwise ``None``.
    rzc must be in range(256)Nr
r)
r
rrrrrstrxor_crrr)termcrrs    rrr`s(
<<<<C<<<<2333
~%c$ii00"6**	TRSSSt99F##,.1$ii899
9T**$V,,!#d)),,~f%%%trc
tt|||tt|dS)z!Very fast XOR - check conditions!N)rrrr)rrrs   r_strxor_directrs0ueVXc%jj-A-ABBBBBr)N)Crypto.Util._raw_apirrrrrrrrrrrr<module>r s>DDDDDDDDDDDDDDDD(')

----`----`CCCCCr
Back to Directory File Manager