Fix sha56 byte count in protocol

This commit is contained in:
zontreck 2024-08-29 16:25:28 -07:00
parent 170f2d35f7
commit d1ff953717
5 changed files with 15 additions and 5 deletions

View file

@ -41,7 +41,7 @@ class PacketServer {
layer.resetPosition();
layer.readLong(); // This is unused outside of the above sanity check.
try {
List<int> dataHash = layer.readBytes(256);
List<int> dataHash = layer.readBytes(32); // Sha256
int sequenceID = layer.readLong();
print("Sequence ID in request: $sequenceID");
@ -196,7 +196,7 @@ class PacketClient {
reply.readLong(); // This is unused outside of the sanity check above.
int sequence = reply.readLong();
int successReceipt = reply.readByte();
List<int> serverHash = reply.readBytes(256);
List<int> serverHash = reply.readBytes(32);
String srvHashStr = Hashing.bytes2Hash(serverHash);
int numBytes = reply.readLong();
List<int> pktBytes = reply.readBytes(numBytes);