| Server IP : 195.114.193.97 / Your IP : 216.73.217.93 Web Server : LiteSpeed System : Linux host 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64 User : sembi4241 ( 1126) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/keyring/backends/__pycache__/ |
Upload File : |
o
���a� � @ s� d dl Z ddlmZ ddlmZ ddlmZ ddlmZm Z e � �.Z
zd dlmZ d dlm
Z
e
j W n eyG d dlZd dl
Z
e
j Y nw W d � n1 sRw Y e �e�ZG d d
� d
�ZG dd� de�ZG d
d� de�ZdS )� N� )�
properties)�KeyringBackend)�SimpleCredential)�PasswordDeleteError�ExceptionRaisedContext)�
pywintypes)� win32credc @ s e Zd Zddd�Zdd� ZdS )�PersistenceNc C s t |dtj�S )N�_persist)�getattrr �CRED_PERSIST_ENTERPRISE)�self�keyring�type� r �:/usr/lib/python3/dist-packages/keyring/backends/Windows.py�__get__ s zPersistence.__get__c C s8 t |t�rd|�dd��� }tt|�}t|d|� dS )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'.
�
CRED_PERSIST_� �_r N)�
isinstance�str�replace�upperr r �setattr)r r �value�attrr r r �__set__ s
zPersistence.__set__)N)�__name__�
__module__�__qualname__r r r r r r r
s
r
c @ s e Zd Zedd� �ZdS )�DecodingCredentialc C s@ | d }z|� d�W S ty |� d�}t�d� | Y S w )zM
Attempt to decode the credential blob as UTF-16 then UTF-8.
�CredentialBlobzutf-16zutf-8zkRetrieved an UTF-8 encoded credential. Please be aware that this library only writes credentials in UTF-16.)�decode�UnicodeDecodeError�log�warning)r �cred�decoded_cred_utf8r r r r . s
��zDecodingCredential.valueN)r r r! �propertyr r r r r r"