Implement protocol encryption #2

Merged
kodi merged 6 commits from encryption into main 2024-10-05 12:07:04 +02:00
Showing only changes of commit 3bb8c5286a - Show all commits

View File

@ -216,6 +216,11 @@ defmodule Amethyst.Minecraft.Read do
{[data | acc], rest, :reversed} {[data | acc], rest, :reversed}
end end
def byte_array({acc, data, :reversed}) do
{[length], rest} = start(data) |> varint |> stop
raw({acc, rest, :reversed}, length)
end
@doc """ @doc """
Reads a varint. `read` tracks the number of bytes read and `nacc` tracks the number being read. Reads a varint. `read` tracks the number of bytes read and `nacc` tracks the number being read.
""" """