equal
deleted
inserted
replaced
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) |