+
    Ji                         R t ^ RIHt ^ RIHtHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHt ]
R,           t ! R	 R4      tR
# )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.)default_backend)Cipher
algorithmsmodes)DBusConnection)	SS_PREFIX)Session)LockedExceptionPromptDismissedException)DBusAddressWrapperexec_promptformat_secretopen_sessionunlock_objectsItemc                   P  a  ] tR t^t o RtR$V 3R lR lltV 3R lR ltV 3R lR ltV 3R	 lR
 ltR$V 3R lR llt	V 3R lR lt
V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltR%V 3R lR lltV 3R lR ltV 3R lR  ltV 3R! lR" ltR#tV tR# )&r   zRepresents a secret item.Nc                >   < V ^8  d   QhRS[ RS[RS[R,          RR/# )   
connection	item_pathsessionNreturn)r   strr   )format__classdict__s   "2lib/python3.14/site-packages/secretstorage/item.py__annotate__Item.__annotate__!   s0     % %> %%*1D.%DH%    c                    W n         \        V\        V4      V n        V P                  P	                  R 4       W0n        Wn        R# )LabelN)r   r   
ITEM_IFACE_itemget_propertyr   r   )selfr   r   r   s   &&&&r   __init__Item.__init__!   s3    "'	:zJ


($r   c                $   < V ^8  d   QhRRRS[ /# )r   otherr   r   bool)r   r   s   "r   r   r   )   s     1 1, 1 1r   c                x    \        VP                  \        4      '       g   Q hV P                  VP                  8H  # N)
isinstancer   r   )r$   r(   s   &&r   __eq__Item.__eq__)   s,    %//3////~~00r   c                    < V ^8  d   QhRS[ /# r   r   r)   )r   r   s   "r   r   r   -   s     7 74 7r   c                J    \        V P                  P                  R4      4      # )zBReturns :const:`True` if item is locked, otherwise
:const:`False`.Locked)r*   r"   r#   r$   s   &r   	is_lockedItem.is_locked-   s     DJJ++H566r   c                   < V ^8  d   QhRR/# r   r   N )r   r   s   "r   r   r   2   s     5 54 5r   c                H    V P                  4       '       d   \        R4      hR# )zQIf collection is locked, raises
:exc:`~secretstorage.exceptions.LockedException`.zItem is locked!N)r5   r	   r4   s   &r   ensure_not_lockedItem.ensure_not_locked2   s"     >>!"344 r   c                4   < V ^8  d   QhRS[ R,          RS[/# )r   timeoutNr   )floatr*   )r   r   s   "r   r   r   8   s#     R Redl Rd Rr   c                H    \        V P                  V P                  .VR7      # )a#  Requests unlocking the item. Usually, this means that the
whole collection containing this item will be unlocked.

Returns a boolean representing whether the prompt has been
dismissed; that means :const:`False` on successful unlocking
and :const:`True` if it has been dismissed.

:raises: ``TimeoutError`` if `timeout` (in seconds) passed
   and the prompt was neither accepted nor dismissed.

.. versionadded:: 2.1.2

.. versionchanged:: 3.0
   No longer accepts the ``callback`` argument.

.. versionchanged:: 3.5
   Added ``timeout`` argument.
)r>   )r   r   r   )r$   r>   s   &&r   unlockItem.unlock8   s    & doo/?QQr   c                6   < V ^8  d   QhRS[ S[S[3,          /# r1   dictr   )r   r   s   "r   r   r   M   s      S#X r   c                N    V P                   P                  R4      p\        V4      # )z%Returns item attributes (dictionary).
Attributes)r"   r#   rE   )r$   attrss   & r   get_attributesItem.get_attributesM   s     

''5E{r   c                :   < V ^8  d   QhRS[ S[S[3,          RR/# )r   
attributesr   NrD   )r   r   s   "r   r   r   R   s'     C Cc3h CD Cr   c                @    V P                   P                  RRV4       R# )z2Sets item attributes to `attributes` (dictionary).rG   za{ss}N)r"   set_property)r$   rL   s   &&r   set_attributesItem.set_attributesR   s    

gzBr   c                    < V ^8  d   QhRS[ /# r1   r   )r   r   s   "r   r   r   V   s      3 r   c                l    V P                   P                  R4      p\        V\        4      '       g   Q hV# )z$Returns item label (unicode string).r    )r"   r#   r-   r   r$   labels   & r   	get_labelItem.get_labelV   s.    

''0%%%%%r   c                $   < V ^8  d   QhRS[ RR/# )r   rU   r   NrR   )r   r   s   "r   r   r   \   s     5 5s 5t 5r   c                `    V P                  4        V P                  P                  RRV4       R# )zSets item label to `label`.r    sN)r;   r"   rN   rT   s   &&r   	set_labelItem.set_label\   s$     

e4r   c                   < V ^8  d   QhRR/# r8   r9   )r   r   s   "r   r   r   a   s     D D Dr   c                    V P                  4        V P                  P                  RR4      w  pVR8w  d.   \        V P                  V4      w  r#V'       d   \        R4      hR# R# )zDeletes the item.Delete /zPrompt dismissed.N)r;   r"   callr   r   r
   )r$   prompt	dismissed_results   &   r   deleteItem.deletea   sW     **//(B/S=!,T__f!EI./BCC  r   c                    < V ^8  d   QhRS[ /# r1   )bytes)r   r   s   "r   r   r   j   s     2 2E 2r   c                   V P                  4        V P                  '       g   \        V P                  4      V n        V P                  P                  RRV P                  P                  4      w  pV P                  P                  '       g   \        V^,          4      # V P                  P                  f   Q h\        P                  ! V P                  P                  4      p\        V^,          4      p\        V\        P                  ! V4      \        4       4      P!                  4       pV^,          pVP#                  \        V4      4      VP%                  4       ,           p\'        V\        4      '       g   Q hVRVR,          )  # )z!Returns item secret (bytestring).	GetSecretoN)r;   r   r   r   r"   rb   object_path	encryptedri   aes_keyr   AESr   r   CBCr   	decryptorupdatefinalizer-   )r$   secretaesaes_ivrs   encrypted_secretpadded_secrets   &      r   
get_secretItem.get_secretj   s    |||'8DL**//+sDLL4L4LM||%%%##||##///nnT\\112vay!3		& 1?3DEOOQ	!!9!((/?)@AIDVDVDXX-////0}R0011r   c                    < V ^8  d   QhRS[ /# r1   rR   )r   r   s   "r   r   r   {   s       r   c                   V P                  4        V P                  '       g   \        V P                  4      V n        V P                  P                  RRV P                  P                  4      w  p\        V^,          4      # )z-Returns content type of item secret (string).rk   rl   )r;   r   r   r   r"   rb   rn   r   )r$   rv   s   & r   get_secret_content_typeItem.get_secret_content_type{   sW     |||'8DL**//+sDLL4L4LM6!9~r   c                *   < V ^8  d   QhRS[ RS[RR/# )r   rv   content_typer   N)ri   r   )r   r   s   "r   r   r      s$     	: 	: 	:!$	:8<	:r   c                    V P                  4        V P                  '       g   \        V P                  4      V n        \	        V P                  W4      pV P
                  P                  RRV4       R# )zSets item secret to `secret`. If `content_type` is given,
also sets the content type of the secret (``text/plain`` by
default).	SetSecretz(oayays)N)r;   r   r   r   r   r"   rb   )r$   rv   r   _secrets   &&& r   
set_secretItem.set_secret   sM    
 	 |||'8DLfC

Z9r   c                    < V ^8  d   QhRS[ /# r1   int)r   r   s   "r   r   r      s      S r   c                l    V P                   P                  R4      p\        V\        4      '       g   Q hV# )zhReturns UNIX timestamp (integer) representing the time
when the item was created.

.. versionadded:: 1.1Createdr"   r#   r-   r   )r$   createds   & r   get_createdItem.get_created   s0    
 **)))4'3''''r   c                    < V ^8  d   QhRS[ /# r1   r   )r   r   s   "r   r   r      s      c r   c                l    V P                   P                  R4      p\        V\        4      '       g   Q hV# )zWReturns UNIX timestamp (integer) representing the time
when the item was last modified.Modifiedr   )r$   modifieds   & r   get_modifiedItem.get_modified   s0     ::**:6(C((((r   c                    < V ^8  d   QhRS[ /# r1   rR   )r   r   s   "r   r   r      s     F F# Fr   c                H    R V P                  4       : RV P                  : R2# )z<Item z path=>)rV   r   r4   s   &r   __repr__Item.__repr__   s$    (+6$..1C1EEr   )r"   r   r   r   r,   )z
text/plain)__name__
__module____qualname____firstlineno____doc__r%   r.   r5   r;   rA   rI   rO   rV   r[   rf   r{   r   r   r   r   r   __static_attributes____classdictcell__)r   s   @r   r   r      s     #% %1 17 7
5 5R R* 
C C 5 5
D D2 2" 	: 	:  F Fr   N)r   cryptography.hazmat.backendsr   &cryptography.hazmat.primitives.ciphersr   r   r   jeepney.io.blockingr   secretstorage.definesr   secretstorage.dhcryptor   secretstorage.exceptionsr	   r
   secretstorage.utilr   r   r   r   r   r!   r   r9   r   r   <module>r      sE   ? 9 L L . + * N  
AF AFr   