+
    3jt                         ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ]P                  ! ]
4      tR
R R lltRR R	 lltR# )    N)blake2b)gethostname)Optional)Unionc                R    V ^8  d   QhR\         R\        \        ,          R\        /# )   hashpepperreturn)boolr   str)formats   "3lib/python3.14/site-packages/anaconda_auth/utils.py__annotate__r      s%      t Xc] c     c                B    \        4       pV'       g   \        P                  R4       TP	                  R4      '       d   TP                  R^4      ^ ,          pT '       d   \        RY!4      pT#   \         d%   p\        P                  RT 24       Rp Rp?LpRp?ii ; i)z
Return the hostname for the current machine.

Args:
    hash: Whether to hash the hostname.
    pepper: Optional pepper for additional security (base64 encoded)

Returns:
    The hostname.
z*socket.gethostname returned an empty valuez(socket.gethostname raised an exception:  Nz.local.hostname)r   loggerinfo	Exceptionendswithrsplithash_string)r	   r
   r   es   &&  r   get_hostnamer      s    =KKDE
 ""??3*1-z8<O  >qcBCs   'A/ /B:BBc          	          V ^8  d   QhR\         R\         R\        \        \         \        3,          ,          R\         /# )r   whatsr
   r   )r   r   r   bytes)r   s   "r   r   r   &   s7      c c 8E#u*4E+F RU r   c                r   \        V\        4      '       d   VP                  R4      pT;'       g    RR\        P                   pV P                  R4      p\        VP                  R4      ^W2R7      pVP                  4       p\        P                  ! V4      P                  R4      P                  R4      pV# )z
Return the hashed string for the current machine.

Args:
    what: The what to hash (example: "hostname").
    s: The string to hash.
    pepper: Optional pepper for additional security (base64 encoded)

Returns:
    Hashed string
zutf-8r   N)digest_sizepersonsalt   =ascii)

isinstancer   encoder   	SALT_SIZEdigestbase64urlsafe_b64encodestripdecode)r   r    r
   r$   hfuncdataresults   &&&    r   r   r   &   s     &#w'mm0w001F[[!FAHHW%2fRE<<>D%%d+11$7>>wGFMr   )FN)N)r,   logginghashlibr   socketr   typingr   r   	getLogger__name__r   r   r    r   r   <module>r:      s6         			8	$6 r   