+
    '(j'                     ~    R t R.t^ RIHt ^ RIHtHtHtHtH	t	H
t
HtHt ^ RIHt ]! RR4      t ! R R]4      tR tR	# )
z
Output Feedback (CFB) mode.
OfbMode)_copy_bytes)load_pycryptodome_raw_libVoidPointercreate_string_bufferget_raw_bufferSmartPointerc_size_tc_uint8_ptris_writeable_buffer)get_random_byteszCrypto.Cipher._raw_ofba  
                        int OFB_start_operation(void *cipher,
                                                const uint8_t iv[],
                                                size_t iv_len,
                                                void **pResult);
                        int OFB_encrypt(void *ofbState,
                                        const uint8_t *in,
                                        uint8_t *out,
                                        size_t data_len);
                        int OFB_decrypt(void *ofbState,
                                        const uint8_t *in,
                                        uint8_t *out,
                                        size_t data_len);
                        int OFB_stop_operation(void *state);
                        c                   >   a  ] tR t^7t o RtR tRR ltRR ltRtV t	R# )r   a  *Output FeedBack (OFB)*.

This mode is very similar to CBC, but it
transforms the underlying block cipher into a stream cipher.

The keystream is the iterated block encryption of the
previous ciphertext block.

An Initialization Vector (*IV*) is required.

See `NIST SP800-38A`_ , Section 6.4.

.. _`NIST SP800-38A` : http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

:undocumented: __init__
c           	        \        4       V n        \        P                  VP	                  4       \        V4      \        \        V4      4      V P                  P                  4       4      pV'       d   \        RV,          4      h\        V P                  P	                  4       \        P                  4      V n        VP                  4        \        V4      V n         \        RRV4      V n         V P                  V n         RR.V n        R# )a  Create a new block cipher, configured in OFB mode.

:Parameters:
  block_cipher : C pointer
    A smart pointer to the low-level block cipher instance.

  iv : bytes/bytearray/memoryview
    The initialization vector to use for encryption or decryption.
    It is as long as the cipher block.

    **The IV must be a nonce, to to be reused for any other
    message**. It shall be a nonce or a random value.

    Reusing the *IV* for encryptions performed with the same key
    compromises confidentiality.
z)Error %d while instantiating the OFB modeNencryptdecrypt)r   _stateraw_ofb_libOFB_start_operationgetr
   r	   len
address_of
ValueErrorr   OFB_stop_operationrelease
block_sizer   ivIV_next)selfblock_cipherr   results   &&& L/home/ubuntu/cf-venv/lib/python3.14/site-packages/Crypto/Cipher/_mode_ofb.py__init__OfbMode.__init__I   s    $ "m001A1A1C1<R19#b'1B151G1G1IK H%& ' '
 #4;;??#4#.#A#AC
 	b'@dD"-	& ''+
    Nc           
        RV P                   9  d   \        R4      hR.V n         Vf   \        \        V4      4      pMRTp\	        V4      '       g   \        R4      h\        V4      \        V4      8w  d   \        R\        V4      ,          4      h\        P                  V P                  P                  4       \        V4      \        V4      \        \        V4      4      4      pV'       d   \        RV,          4      hVf   \        V4      # R# )aE  Encrypt data with the key and the parameters set at initialization.

A cipher object is stateful: once you have encrypted a message
you cannot encrypt (or decrypt) another message using the same
object.

The data to encrypt can be broken up in two or
more pieces and `encrypt` can be called multiple times.

That is, the statement:

    >>> c.encrypt(a) + c.encrypt(b)

is equivalent to:

     >>> c.encrypt(a+b)

This function does not add any padding to the plaintext.

:Parameters:
  plaintext : bytes/bytearray/memoryview
    The piece of data to encrypt.
    It can be of any length.
:Keywords:
  output : bytearray/memoryview
    The location where the ciphertext must be written to.
    If ``None``, the ciphertext is returned.
:Return:
  If ``output`` is ``None``, the ciphertext is returned as ``bytes``.
  Otherwise, ``None``.
r   z*encrypt() cannot be called after decrypt()N4output must be a bytearray or a writeable memoryview9output must have the same length as the input  (%d bytes)z%Error %d while encrypting in OFB mode)r   	TypeErrorr   r   r   r   r   OFB_encryptr   r   r
   r	   r   )r   	plaintextoutput
ciphertextr    s   &&&  r!   r   OfbMode.encrypty   s    B DJJ&HII[
>-c)n=JJ&v.. VWW9~V,  "025i."A B B (():)4Y)?)4Z)@)1#i.)AC DvMNN>!*--r$   c           
        RV P                   9  d   \        R4      hR.V n         Vf   \        \        V4      4      pMRTp\	        V4      '       g   \        R4      h\        V4      \        V4      8w  d   \        R\        V4      ,          4      h\        P                  V P                  P                  4       \        V4      \        V4      \        \        V4      4      4      pV'       d   \        RV,          4      hVf   \        V4      # R# )aB  Decrypt data with the key and the parameters set at initialization.

A cipher object is stateful: once you have decrypted a message
you cannot decrypt (or encrypt) another message with the same
object.

The data to decrypt can be broken up in two or
more pieces and `decrypt` can be called multiple times.

That is, the statement:

    >>> c.decrypt(a) + c.decrypt(b)

is equivalent to:

     >>> c.decrypt(a+b)

This function does not remove any padding from the plaintext.

:Parameters:
  ciphertext : bytes/bytearray/memoryview
    The piece of data to decrypt.
    It can be of any length.
:Keywords:
  output : bytearray/memoryview
    The location where the plaintext is written to.
    If ``None``, the plaintext is returned.
:Return:
  If ``output`` is ``None``, the plaintext is returned as ``bytes``.
  Otherwise, ``None``.
r   z*decrypt() cannot be called after encrypt()Nr&   r'   z%Error %d while decrypting in OFB mode)r   r(   r   r   r   r   r   OFB_decryptr   r   r
   r	   r   )r   r,   r+   r*   r    s   &&&  r!   r   OfbMode.decrypt   s    B DJJ&HII[
>,S_=II&v.. VWW:#f+-  "025i."A B B (():)4Z)@)4Y)?)1#j/)BD DvMNN>!),,r$   )r   r   r   r   r   )N)
__name__
__module____qualname____firstlineno____doc__r"   r   r   __static_attributes____classdictcell__)__classdict__s   @r!   r   r   7   s      ".,`;z; ;r$   c                   V P                  V4      pVP                  RR4      pVP                  RR4      pRW438X  d   \        V P                  4      pVe   Ve   \	        R4      hMTp\        V4      V P                  8w  d   \        RV P                  ,          4      hV'       d   \	        R\        V4      ,          4      h\        W#4      # )a  Instantiate a cipher object that performs OFB encryption/decryption.

:Parameters:
  factory : module
    The underlying block cipher, a module from ``Crypto.Cipher``.

:Keywords:
  iv : bytes/bytearray/memoryview
    The IV to use for OFB.

  IV : bytes/bytearray/memoryview
    Alias for ``iv``.

Any other keyword will be passed to the underlying block cipher.
See the relevant documentation for details (at least ``key`` will need
to be present).
r   Nr   z*You must either use 'iv' or 'IV', not bothz.Incorrect IV length (it must be %d bytes long)zUnknown parameters for OFB: %s)NN)	_create_base_cipherpopr   r   r(   r   r   strr   )factorykwargscipher_stater   r   s   &,   r!   _create_ofb_cipherr@      s    & ..v6L	D$	B	D$	Bxg001	~>HII  
2w'$$$I""# $ 	$ 83v;FGG<$$r$   N)r5   __all__Crypto.Util.py3compatr   Crypto.Util._raw_apir   r   r   r   r   r	   r
   r   Crypto.Randomr   r   objectr   r@    r$   r!   <module>rG      sQ   . + -7 7 7
 +'(@ C *$zf zz&%r$   