+
    '(j                     D    R t R.t^ RIHt ^ RIHt  ! R R]4      tR tR# )z
OpenPGP mode.
OpenPgpMode)_copy_bytes)get_random_bytesc                   6   a  ] tR t^(t o RtR tR tR tRtV t	R# )r   aJ  OpenPGP mode.

This mode is a variant of CFB, and it is only used in PGP and
OpenPGP_ applications. If in doubt, use another mode.

An Initialization Vector (*IV*) is required.

Unlike CFB, the *encrypted* IV (not the IV itself) is
transmitted to the receiver.

The IV is a random data block. For legacy reasons, two of its bytes are
duplicated to act as a checksum for the correctness of the key, which is now
known to be insecure and is ignored. The encrypted IV is therefore 2 bytes
longer than the clean IV.

.. _OpenPGP: http://tools.ietf.org/html/rfc4880

:undocumented: __init__
c                   VP                   V n         R V n        VP                  ! VVP                  3RRV P                   ,          RV P                   ^,          /VB p\	        RRV4      p\        V4      V P                   8X  d!   VP                  W3RR ,           4      V n        Mk\        V4      V P                   ^,           8X  d   W0n        VP                  V4      RR pM/\        RV P                   V P                   ^,           3,          4      hV;V n
        V n        VP                  ! VVP                  3RV P                  V P                   ) R RV P                   ^,          /VB V n        R# )FIV    segment_sizeNz4Length of IV must be %d or %d bytes for MODE_OPENPGP)
block_size_done_first_blocknewMODE_CFBr   lenencrypt_encrypted_IVdecrypt
ValueErrorivr   _cipher)selffactorykeyr   cipher_params	IV_ciphers   &&&&& P/home/ubuntu/cf-venv/lib/python3.14/site-packages/Crypto/Cipher/_mode_openpgp.py__init__OpenPgpMode.__init__=   so    ",,!& KK(() #T__4) &*__q%8	)
 ()	 tR( r7doo%!*!2!2223<!@DW!++!# ""2&s+B 1 $11DEF G G $' {{#,,-  $114??2B2CD- *.1)<	-
 ,-    c                    V P                   P                  V4      pV P                  '       g   V P                  V,           pRV n        V# )a  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.

:Return:
    the encrypted data, as a byte string.
    It is as long as *plaintext* with one exception:
    when encrypting the first message chunk,
    the encypted IV is prepended to the returned ciphertext.
T)r   r   r   r   )r   	plaintextress   && r   r   OpenPgpMode.encryptg   sA    > ll""9-%%%$$s*C%)D"
r   c                8    V P                   P                  V4      # )aa  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.

:Return: the decrypted data (byte string).
)r   r   )r   
ciphertexts   &&r   r   OpenPgpMode.decrypt   s    6 ||##J//r   )r   r   r   r   r   r   N)
__name__
__module____qualname____firstlineno____doc__r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r   (   s      ((-T#J0 0r   c                H   VP                  RR4      pVP                  RR4      pRW#38X  d   \        V P                  4      pVe   Ve   \        R4      hMTp VP                  R4      p\        YY!4      #   \         d!   p\        R\        T4      ,           4      hRp?ii ; i)a  Create a new block cipher, configured in OpenPGP mode.

:Parameters:
  factory : module
    The module.

:Keywords:
  key : bytes/bytearray/memoryview
    The secret key to use in the symmetric cipher.

  IV : bytes/bytearray/memoryview
    The initialization vector to use for encryption or decryption.

    For encryption, the IV must be as long as the cipher block size.

    For decryption, it must be 2 bytes longer (it is actually the
    *encrypted* IV which was prefixed to the ciphertext).
r   Nr   z*You must either use 'iv' or 'IV', not bothr   zMissing component: )NN)popr   r   	TypeErrorKeyErrorstrr   )r   kwargsr   r   r   es   &,    r   _create_openpgp_cipherr5      s    ( 
D$	B	D$	Bxg001	~>HII  8jj wR00  8-A6778s   A6 6B!BB!N)	r*   __all__Crypto.Util.py3compatr   Crypto.Randomr   objectr   r5    r   r   <module>r;      s-   > / - *0& 0D$1r   