Software /
code /
prosody
Comparison
net/websocket/frames.lua @ 13250:cfd062d025b0
net.websocket.frames: Remove completed TODO
The XOR is done in C since 4e5a2af9dd19
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 29 Jul 2023 01:42:19 +0200 |
parent | 12974:ba409c67353b |
comparison
equal
deleted
inserted
replaced
13249:5884d58707fa | 13250:cfd062d025b0 |
---|---|
75 | 75 |
76 return result, header_length; | 76 return result, header_length; |
77 end | 77 end |
78 | 78 |
79 -- XORs the string `str` with the array of bytes `key` | 79 -- XORs the string `str` with the array of bytes `key` |
80 -- TODO: optimize | |
81 local function apply_mask(str, key, from, to) | 80 local function apply_mask(str, key, from, to) |
82 return sxor(str:sub(from or 1, to or -1), key); | 81 return sxor(str:sub(from or 1, to or -1), key); |
83 end | 82 end |
84 | 83 |
85 local function parse_frame_body(frame, header, pos) | 84 local function parse_frame_body(frame, header, pos) |