+
    oiy                        R t ^ RIHtHtHt RR R lltR.t]R8X  dm   ]! R4       ^ RI	t	]
! R4       FJ  t]	P                  ! 4       w  tt]'       d    M-]^d,          ^ 8X  g   K1  ]'       g   K;  ]! R	],          4       KL  	  ]! R
4       R# R# )zFunctions for PKCS#1 version 2 encryption and signing

This module implements certain functionality from PKCS#1 version 2. Main
documentation is RFC 2437: https://tools.ietf.org/html/rfc2437
)commonpkcs1	transformc                H    V ^8  d   QhR\         R\        R\        R\         /# )   seedlengthhasherreturn)bytesintstr)formats   "o/Users/tonyclaw/.openclaw/workspace/scripts/youtube-playlists/venv/lib/python3.14/site-packages/rsa/pkcs1_v2.py__annotate__r      s(     5 5u 5c 53 5U 5    c                  a a  \         P                  S,          ! 4       P                  pTR	T,          8  d   \        RP                  TSR7      4      hRP                  TT 3R l\        \        P                  ! Y4      ^,           4       4       4      pTRT #   \         dV   p\	        RP                  RP                  \        \         P                  P                  4       4      4      R7      4      ThRp?ii ; i)
aL  
MGF1 is a Mask Generation Function based on a hash function.

A mask generation function takes an octet string of variable length and a
desired output length as input, and outputs an octet string of the desired
length. The plaintext-awareness of RSAES-OAEP relies on the random nature of
the output of the mask generation function, which in turn relies on the
random nature of the underlying hash.

:param bytes seed: seed from which mask is generated, an octet string
:param int length: intended length in octets of the mask, at most 2^32(hLen)
:param str hasher: hash function (hLen denotes the length in octets of the hash
    function output)

:return: mask, an octet string of length `length`
:rtype: bytes

:raise OverflowError: when `length` is too large for the specified `hasher`
:raise ValueError: when specified `hasher` is invalid
z=Invalid `hasher` specified. Please select one of: {hash_list}z, )	hash_listNzmDesired length should be at most 2**32 times the hasher's output length ({hash_length} for {hasher} function))hash_lengthr	   r   c           	   3      <"   T F:  p\         P                  ! S\        P                  ! V^R7      ,           SR7      x  K<  	  R# 5i)   )	fill_size)method_nameN)r   compute_hashr   	int2bytes).0counterr	   r   s   & r   	<genexpr>mgf1.<locals>.<genexpr>H   sF      
 GG	 	9&&w!<<	
 	
 Gs   AAl        )r   HASH_METHODSdigest_sizeKeyError
ValueErrorr   joinsortedkeysOverflowErrorranger   ceil_div)r   r   r	   r   exoutputs   f&f   r   mgf1r+      s    ,((02>> ;&';;A6' <B <
 	
 XX 
 V__VAAEF F '6?;  KRR))F5+=+=+B+B+D$EF S 
 		s   &B C9$AC44C9r+   __main__z'Running doctests 1000x or until failureNi  z%i timeszDoctests done)zSHA-1)__doc__rsar   r   r   r+   __all____name__printdoctestr'   counttestmodfailurestests r   r   <module>r8      s    5r  z	
34t#OO-53;!*u$%  
/ r   