o
    �õ±j.  ã                   @   sÂ   d dl Z d dlZd dlmZ d dlmZmZmZmZ dZ	d Z
dZdZG dd„ dejƒZG d	d
„ d
ejƒZG dd„ dejƒZG dd„ dejƒZG dd„ dƒZG dd„ dejƒZG dd„ dejƒZdS )é    N)Úcore)ÚEncryptionKeyÚChecksumÚKerberosTimeÚRealmÚexplicité   é   c                   @   s0   e Zd ZdejeddœfdejeddœfgZdS )ÚKERB_AD_RESTRICTION_ENTRYzrestriction-typer   ©Útag_typeÚtagÚrestrictionr   N©Ú__name__Ú
__module__Ú__qualname__r   ÚIntegerÚTAGÚOctetStringÚ_fields© r   r   ú�/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/minikerberos/protocol/mskile.pyr
      s    þr
   c                   @   ó   e Zd ZeZdS )ÚKERB_AD_RESTRICTION_ENTRYSN)r   r   r   r
   Ú_child_specr   r   r   r   r      ó    r   c                   @   s2   e Zd ZdejeddœfdejedddœfgZdS )	ÚKERB_ERROR_DATAz	data-typer   r   z
data-valuer	   T)r   r   ÚoptionalNr   r   r   r   r   r      s    þr   c                   @   s    e Zd ZdejeddœfgZdS )ÚKERB_PA_PAC_REQUESTzinclude-pacr   r   N)r   r   r   r   ÚBooleanr   r   r   r   r   r   r   #   s    ÿr   c                   @   s>   e Zd Ze d¡fdd„Zdd„ Zedd„ ƒZedd	„ ƒZ	d
S )ÚLSAP_TOKEN_INFO_INTEGRITYé    c                 C   s   d | _ d | _|| _d S ©N)ÚFlagsÚTokenILÚ	MachineID)ÚselfÚ
machine_idr   r   r   Ú__init__2   s   
z"LSAP_TOKEN_INFO_INTEGRITY.__init__c                 C   s6   | j jdddd�}|| jjdddd�7 }|| j7 }|S )Né   ÚlittleF©Ú	byteorderÚsigned)r$   Úto_bytesr%   r&   )r'   Útr   r   r   r/   7   s   
z"LSAP_TOKEN_INFO_INTEGRITY.to_bytesc                 C   s   t  t | ¡¡S r#   )r!   Úfrom_bufferÚioÚBytesIO)Údatar   r   r   Ú
from_bytes=   s   z$LSAP_TOKEN_INFO_INTEGRITY.from_bytesc                 C   sF   t ƒ }tj|  d¡ddd�|_tj|  d¡ddd�|_|  d¡|_|S )Nr*   r+   Fr,   r"   )r!   Úintr5   Úreadr$   r%   r&   )ÚbuffÚmsgr   r   r   r1   A   s
   z%LSAP_TOKEN_INFO_INTEGRITY.from_bufferN)
r   r   r   ÚosÚurandomr)   r/   Ústaticmethodr5   r1   r   r   r   r   r!   1   s    
r!   c                   @   r   )ÚKERB_KEY_LIST_REPN)r   r   r   r   r   r   r   r   r   r=   J   r   r=   c                   @   s   e Zd ZejZdS )ÚKERB_KEY_LIST_REQN)r   r   r   r   r   r   r   r   r   r   r>   M   s    
r>   )r:   r2   Ú
asn1cryptor   Ú"minikerberos.protocol.asn1_structsr   r   r   r   r   Ú	UNIVERSALÚAPPLICATIONÚCONTEXTÚSequencer
   Ú
SequenceOfr   r   r   r!   r=   r>   r   r   r   r   Ú<module>   s     