o
    h                     @   s"   d Z ddlmZ G dd dZdS )zPython implementation of Arcfour encryption algorithm.
See https://en.wikipedia.org/wiki/RC4
This code is in the public domain.

    )Sequencec                   @   s<   e Zd Zdee ddfddZdedefddZe ZZ	dS )	ArcfourkeyreturnNc                 C   sx   dd t dD }d}t|}t dD ]}|||  |||   d }|| || ||< ||< q|| _d\| _| _d S )Nc                 S   s   g | ]}|qS  r   ).0ir   r   I/var/www/html/govbot/env/lib/python3.10/site-packages/pdfminer/arcfour.py
<listcomp>   s    z$Arcfour.__init__.<locals>.<listcomp>   r   )r   r   )rangelensr   j)selfr   r   r   klenr   r   r   r	   __init__   s   zArcfour.__init__datac                 C   s   | j | j}}| j}d}t|D ]2}|d d }|||  d }|| || ||< ||< ||| ||  d  }|t||A f7 }q||| _ | _|S )N       r   )r   r   r   iterbytes)r   r   r   r   r   rckr   r   r	   process   s   zArcfour.process)
__name__
__module____qualname__r   intr   r   r   encryptdecryptr   r   r   r	   r   
   s    r   N)__doc__typingr   r   r   r   r   r	   <module>   s    