Files
Trancribe/venv/lib/python3.12/site-packages/websockets/__pycache__/utils.cpython-312.pyc

35 lines
2.2 KiB
Plaintext
Raw Normal View History

<EFBFBD>
$n!j<><00><01>`<00>ddlmZddlZddlZddlZddlZddlmZddgZdZ d d<08>Z
d d <09>Z d d
<EFBFBD>Z y)<0E>)<01> annotationsN<73>)<01> BytesLike<6B>
accept_key<EFBFBD>
apply_maskz$258EAFA5-E914-47DA-95CA-C5AB0DC85B11c<01>r<00>tjd<01>}tj|<00>j <00>S)zB
Generate a random key for the Sec-WebSocket-Key header.
<20>)<05>secrets<74> token_bytes<65>base64<36> b64encode<64>decode)<01>keys <20>R/home/jean/linux-transcriber/venv/lib/python3.12/site-packages/websockets/utils.py<70> generate_keyrs.<00><00>
<12>
<1D>
<1D>b<EFBFBD>
!<21>C<EFBFBD> <11> <1B> <1B>C<EFBFBD> <20> '<27> '<27> )<29>)<29>c<01><><00>tj|tzj<00><00>j <00>}t j |<01>j<00>S)z
Compute the value of the Sec-WebSocket-Accept header.
Args:
key: Value of the Sec-WebSocket-Key header.
)<08>hashlib<69>sha1<61>GUID<49>encode<64>digestr r r)rrs rrrsB<00><00> <13><<3C><<3C><13>t<EFBFBD><1A>+<2B>+<2B>-<2D> .<2E> 5<> 5<> 7<>D<EFBFBD> <11> <1B> <1B>D<EFBFBD> !<21> (<28> (<28> *<2A>*rc<01>b<00>t|<01>dk7r td<02><00>tj|tj
<00>}|t|<00>dzz|dt|<00>dzz}tj|tj
<00>}||z j t|<00>tj
<00>S)z
Apply masking to the data of a WebSocket message.
Args:
data: Data to mask.
mask: 4-bytes mask.
<20>zmask must contain 4 bytesN)<07>len<65>
ValueError<EFBFBD>int<6E>
from_bytes<EFBFBD>sys<79> byteorder<65>to_bytes)<05>data<74>mask<73>data_int<6E> mask_repeated<65>mask_ints rrr&s<><00><00> <0B>4<EFBFBD>y<EFBFBD>A<EFBFBD>~<7E><18>4<>5<>5<><12>~<7E>~<7E>d<EFBFBD>C<EFBFBD>M<EFBFBD>M<EFBFBD>2<>H<EFBFBD><18>C<EFBFBD><04>I<EFBFBD><11>N<EFBFBD>+<2B>d<EFBFBD>?<3F>S<EFBFBD><14>Y<EFBFBD><11>]<5D>.C<>C<>M<EFBFBD><12>~<7E>~<7E>m<EFBFBD>S<EFBFBD>]<5D>]<5D>;<3B>H<EFBFBD> <14>x<EFBFBD> <1F> )<29> )<29>#<23>d<EFBFBD>)<29>S<EFBFBD>]<5D>]<5D> C<>Cr)<02>return<72>str)rr(r'r()r"rr#zbytes | bytearrayr'<00>bytes) <0A>
__future__rr rr
r<00>typingr<00>__all__rrrr<00>rr<00><module>r.s:<00><01>"<22> <0A><0E><0E>
<EFBFBD><1D> <18><1C>
&<26><07>.<2E><04>*<2A> +<2B>Dr