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     