o
    j[                     @   s(   d dl Z G dd dZG dd dZdS )    Nc                   @   4   e Zd Zdd Zedd Zedd Zdd Zd	S )
USER_PROPERTIESc                 C   s4   d | _ d | _d | _d | _d | _d | _d | _g | _d S N)	Reserved1Length	Reserved2	Reserved3	Reserved4PropertySignaturePropertyCountUserPropertiesself r   /root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/aesedb/security/structures/userprops.py__init__   s   
zUSER_PROPERTIES.__init__c                 C      t t| S r   )r   from_bufferioBytesIOdatar   r   r   
from_bytes      zUSER_PROPERTIES.from_bytesc                 C   s   t  }tj| dddd|_tj| dddd|_tj| dddd|_tj| dddd|_| d|_tj| dddd|_	tj| dddd|_
t|j
D ]}t| }|j| qV|S )N   littleF	byteordersigned   `   )r   intr   readr   r   r   r   r	   r
   r   rangeUSER_PROPERTYr   r   append)buffres_propr   r   r   r      s   
zUSER_PROPERTIES.from_bufferc                 C   sh   d}| j D ],}t| j | tr&| j | D ]}|d|| j | t|f 7 }qq|d|| j | f 7 }q|S )N z
%s : %s %s%s : %s)__dict__
isinstanceliststr)r   tker   r   r   __str__!   s   
zUSER_PROPERTIES.__str__N__name__
__module____qualname__r   staticmethodr   r   r3   r   r   r   r   r      s    


r   c                   @   r   )
r$   c                 C   s"   d | _ d | _d | _d | _d | _d S r   )
NameLengthValueLengthReservedPropertyNamePropertyValuer   r   r   r   r   -   s
   
zUSER_PROPERTY.__init__c                 C   r   r   )r$   r   r   r   r   r   r   r   r   4   r   zUSER_PROPERTY.from_bytesc                 C   st   t  }tj| dddd|_tj| dddd|_tj| dddd|_| |jd|_| |j|_	|S )Nr   r   Fr   zutf-16le)
r$   r!   r   r"   r9   r:   r;   decoder<   r=   )r&   r'   r   r   r   r   8   s   zUSER_PROPERTY.from_bufferc                 C   s*   d}| j D ]}|d|| j | f 7 }q|S )Nr*   r+   )r,   )r   r0   r1   r   r   r   r3   B   s   
zUSER_PROPERTY.__str__Nr4   r   r   r   r   r$   ,   s    

	r$   )r   r   r$   r   r   r   r   <module>   s    )