← Back
Editing: item.cpython-311.pyc
� ��b� � � � d Z ddlmZmZ ddlmZ ddlmZ ddlm Z ddl mZmZ ddl mZmZmZmZmZ ddlmZmZmZ dd lmZ ed z Z G d� d � � ZdS ) aQ SecretStorage item contains a *secret*, some *attributes* and a *label* visible to user. Editing all these properties and reading the secret is possible only when the :doc:`collection <collection>` storing the item is unlocked. The collection can be unlocked using collection's :meth:`~secretstorage.collection.Collection.unlock` method.� )�Dict�Optional)�DBusConnection)� SS_PREFIX)�Session)�LockedException�PromptDismissedException)�DBusAddressWrapper�exec_prompt�open_session� format_secret�unlock_objects)�Cipher� algorithms�modes)�default_backend�Itemc � � e Zd ZdZ ddededee ddfd�Zdd de fd �Z de fd�Zdd�Zde fd �Z deeef fd�Zdeeef ddfd�Zdefd�Zdeddfd�Zdd�Zdefd�Zdefd�Z ddededdfd�Zdefd�Zdefd�ZdS ) r zRepresents a secret item.N� connection� item_path�session�returnc � � || _ t |t |� � | _ | j � d� � || _ || _ d S )N�Label)r r � ITEM_IFACE�_item�get_propertyr r )�selfr r r s �4/usr/lib/python3/dist-packages/secretstorage/item.py�__init__z Item.__init__ sD � �"���'� �:�z�J�J�� �� ����(�(�(����$����� �otherr c �Z � t |j t � � sJ �| j |j k S �N)� isinstancer �str)r r"