+
    ei_  c                  s|   ^ RI Ht ^ RIt^ RIHt ^RIHt ^RIHt ^RI	H
t
 ^RIHt ]! 4       ;_uu_ 4       t ^ RIHtHt ]P"                   RRR4       ]P&                  ! ]4      t ! R	 R
4      t ! R R]4      t ! R R]4      tR#   ] d    ^ RIt^ RIt]P"                    LYi ; i  + '       g   i     Le; i)i    )annotationsN)ExceptionTrap)KeyringBackend)
properties)SimpleCredential)PasswordDeleteError)
pywintypes	win32credc                  s&    ] tR t^tRR ltR tRtR# )PersistenceNc                	s8    \        VR \        P                  4      # )_persist)getattrr   ZCRED_PERSIST_ENTERPRISE)selfkeyringZtypes   &&&=/usr/lib/python3.14/site-packages/keyring/backends/Windows.py__get__ZPersistence.__get__   s    w
I,M,MNN    c                s    \        V\        4      '       d8   RVP                  RR4      P                  4       ,           p\	        \
        V4      pW!n        R# )z
Set the persistence value on the Keyring. Value may be
one of the win32cred.CRED_PERSIST_* constants or a
string representing one of those constants. For example,
'local machine' or 'session'.
ZCRED_PERSIST_Z Z_N)Z
isinstancestrZreplaceZupperr
   r   r	   )r   r   valueZattr   &&& r   __set__ZPersistence.__set__"   sA     eS!!"U]]3%<%B%B%DDDIt,E r    N)__name__
__module____qualname____firstlineno__r   r   __static_attributes__r   r   r   r   r      s    O
!r   r   c                  s&    ] tR t^/t]R 4       tRtR# )DecodingCredentialc                s    V R,          p VP                  R4      #   \         d,    TP                  R4      p\        P                  R4       Tu # i ; i)z=
Attempt to decode the credential blob as UTF-16 then UTF-8.
CredentialBlobzutf-16zutf-8zjRetrieved a UTF-8 encoded credential. Please be aware that this library only writes credentials in UTF-16.)ZdecodeZUnicodeDecodeErrorlogZwarning)r   ZcredZdecoded_cred_utf8s   &  r   r   ZDecodingCredential.value0   s[    
 $%	%;;x((! 	% $G 4KKB %$	%s    3AAr   N)r   r   r   r   Zpropertyr   r   r   r   r   r   r   /   s    % %r   r   c                  s    ] tR t^AtRt]! 4       t]P                  R R l4       t	]
R 4       tR tR R ltR tR	 tR
 tR tR tR tRtR# )WinVaultKeyringa6  
WinVaultKeyring stores encrypted passwords using the Windows Credential
Manager.

Requires pywin32

This backend does some gymnastics to simulate multi-user support,
which WinVault doesn't support natively. See
https://github.com/jaraco/keyring/issues/47#issuecomment-75763152
for details on the implementation, but here's the gist:

Passwords are stored under the service name unless there is a collision
(another password with the same service name but different user name),
in which case the previous password is moved into a compound name:
{username}@{service}
c               s    V ^8  d   QhRR/# )   returnZfloatr   Zformat   "r   __annotate__WinVaultKeyring.__annotate__V   s       r   c                s4    \         '       d   \        R4      h^# )z1
If available, the preferred backend on Windows.
zRequires Windows and pywin32)missing_depsZRuntimeError)Zclss   &r   priorityZWinVaultKeyring.priorityU   s    
 <=>>r   c                	s    V  R V 2# )Z@r   )usernameservices   &&r   _compound_nameZWinVaultKeyring._compound_name^   s    1WI&&r   c                	sP    V P                  W4      pT;'       d    VP                  # r   )_resolve_credentialr   r   r(   r'   resr   r   get_passwordZWinVaultKeyring.get_passwordb   s$    &&w9  syy r   c               s$    V ^8  d   QhRRRRRR/# )r   r(   r   r'   z
str | Noner    zDecodingCredential | Noner   r!   r"   r   r#   r$   f   s$      &0	"r   c                	s    V P                  V4      pV'       d   V'       d/   VR ,          V8w  d!   V P                  V P                  W!4      4      pV# UserName)_read_credentialr)   r+   r   r   r*   Z#WinVaultKeyring._resolve_credentialf   sD     ##G,h3z?h#>''(;(;H(NOC
r   c                	s     \         P                  ! \         P                  VR 7      p\        T4      #   \        P                   d/   pTP
                  R8X  d   TP                  R8X  d    Rp?R# h Rp?ii ; i)Type
TargetName  CredReadN)r   r5   CRED_TYPE_GENERICr   errorwinerrorfuncnamer   )r   targetr,   es   &&  r   r0   Z WinVaultKeyring._read_credentialp   sd    	$$00VC "#&&	  	zzT!ajjJ&>	s   &3 A6"A10A11A6c                	s    V P                  V4      pV'       d8   VR ,          pV P                  WQ4      pV P                  VVVP                  4       V P                  W\	        V4      4       R# )r/   N)r0   r)   _set_passwordr   r   )r   r(   r'   passwordexisting_pwZexisting_usernamer:   s   &&&&   r   set_passwordZWinVaultKeyring.set_password{   sd    ++G4 +J 7(():DF!!!
 	7c(m<r   c           	     	s    \        \        P                  VVVR V P                  R7      p\        P                  ! V^ 4       R# )zStored using python-keyring)r2   r3   r/   r   ZCommentZPersistN)dictr   r6   persistZ	CredWrite)r   r:   r'   r=   Z
credentials   &&&& r   r<   ZWinVaultKeyring._set_password   s:    ,,#1LL

 	J*r   c                	s    V P                  W!4      pR pW3 FA  pV P                  V4      pV'       g   K  VR,          V8X  g   K.  RpV P                  V4       KC  	  V'       g   \        V4      hR# )Fr/   TN)r)   r0   _delete_passwordr   )r   r(   r'   ZcompoundZdeletedr:   r>   s   &&&    r   delete_passwordZWinVaultKeyring.delete_password   sm    &&x9'F//7K{{:6(B%%f-	 (
 %g.. r   c                	s     \         P                  ! \         P                  VR 7       R#   \        P                   d/   pTP
                  R8X  d   TP                  R8X  d    Rp?R# h Rp?ii ; i)r1   r4   
CredDeleteN)r   rD   r6   r   r7   r8   r9   )r   r:   r;   s   && r   rB   Z WinVaultKeyring._delete_password   sP    	  i&A&AfU 	zzT!ajjL&@	s   &* A-"A('A((A-c                	sr    V P                  W4      pT;'       d    \        VR ,          VP                  4      # r.   )r*   r   r   r+   r   r   get_credentialZWinVaultKeyring.get_credential   s0    &&w9CC'JCCr   r   N)r   r   r   r   Z__doc__r   rA   r   Zclasspropertyr&   Zstaticmethodr)   r-   r*   r0   r?   r<   rC   rB   rE   r   r   r   r   r   r   A   se    " mG  ' '!	'=	+	/Dr   r   )Z
__future__r    ZloggingZjaraco.contextr   Zbackendr   Zcompatr   Zcredentialsr   Zerrorsr   r%   Zwin32ctypes.pywin32r   r   r   ZImportErrorZ	getLoggerr   r   r@   r   r   r   r   r   <module>rF      s    "  ( $  * (__= 	  !! !"% %$gDn gD]   	 _s(   B+B

B(%B+'B((B++B;	