U
    2ÜŸj  ã                   @   s@   d Z ddlmZmZmZ eeeeeeef  f dœdd„ZdS )zc
Parsing for the moduli file, which contains Diffie-Hellman prime groups.

Maintainer: Paul Swartz
é    )ÚDictÚListÚTuple)ÚfilenameÚreturnc              	   C   sž   t | ƒ�}| ¡ }W 5 Q R X i }|D ]t}| ¡ }|r$|d dkrBq$| ¡ \}}}}}	}
}t|	ƒd }t|
ƒ}t|dƒ}||kr†g ||< ||  ||f¡ q$|S )Nr   ú#é   é   )ÚopenÚ	readlinesÚstripÚsplitÚintÚappend)r   ÚfÚlinesZprimesÚlZtimÚtypZtstZtriZsizestrZgenstrZmodstrÚsizeÚgenÚmod© r   úG/tmp/pip-unpacked-wheel-4b529toj/twisted/conch/openssh_compat/primes.pyÚparseModuliFile   s    

r   N)Ú__doc__Útypingr   r   r   Ústrr   r   r   r   r   r   Ú<module>   s   