Fix sha56 byte count in protocol
This commit is contained in:
parent
170f2d35f7
commit
d1ff953717
5 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
||||||
class Constants {
|
class Constants {
|
||||||
static const VERSION = "1.2.082924+1513";
|
static const VERSION = "1.2.082924+1625";
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ class PacketServer {
|
||||||
layer.resetPosition();
|
layer.resetPosition();
|
||||||
layer.readLong(); // This is unused outside of the above sanity check.
|
layer.readLong(); // This is unused outside of the above sanity check.
|
||||||
try {
|
try {
|
||||||
List<int> dataHash = layer.readBytes(256);
|
List<int> dataHash = layer.readBytes(32); // Sha256
|
||||||
int sequenceID = layer.readLong();
|
int sequenceID = layer.readLong();
|
||||||
print("Sequence ID in request: $sequenceID");
|
print("Sequence ID in request: $sequenceID");
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ class PacketClient {
|
||||||
reply.readLong(); // This is unused outside of the sanity check above.
|
reply.readLong(); // This is unused outside of the sanity check above.
|
||||||
int sequence = reply.readLong();
|
int sequence = reply.readLong();
|
||||||
int successReceipt = reply.readByte();
|
int successReceipt = reply.readByte();
|
||||||
List<int> serverHash = reply.readBytes(256);
|
List<int> serverHash = reply.readBytes(32);
|
||||||
String srvHashStr = Hashing.bytes2Hash(serverHash);
|
String srvHashStr = Hashing.bytes2Hash(serverHash);
|
||||||
int numBytes = reply.readLong();
|
int numBytes = reply.readLong();
|
||||||
List<int> pktBytes = reply.readBytes(numBytes);
|
List<int> pktBytes = reply.readBytes(numBytes);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: libac_dart
|
name: libac_dart
|
||||||
description: "Aria's Creations code library"
|
description: "Aria's Creations code library"
|
||||||
version: 1.2.082924+1513
|
version: 1.2.082924+1625
|
||||||
homepage: "https://zontreck.com"
|
homepage: "https://zontreck.com"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,14 @@ void main() {
|
||||||
test("Test md5", () {
|
test("Test md5", () {
|
||||||
expect(Hashing.md5Hash("Hello World"), "b10a8db164e0754105b7a99be72e3fe5");
|
expect(Hashing.md5Hash("Hello World"), "b10a8db164e0754105b7a99be72e3fe5");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("Test sha256", () {
|
||||||
|
List<int> hsh = Hashing.sha256Sum([0x0A, 0x0B]);
|
||||||
|
print("Sha256 Length: ${hsh.length}");
|
||||||
|
|
||||||
|
print("Sha256 Hash: ${Hashing.bytes2Hash(hsh)}");
|
||||||
|
|
||||||
|
expect(Hashing.bytes2Hash(hsh),
|
||||||
|
"bea0b72e71bfe7f15a88c25305bf96a9681e34d3aabe0c9a1b7093cb32d8ff05");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ Future<void> main() async {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Test directory size checking", () async {
|
test("Test directory size checking", () async {
|
||||||
expect(await getDirectorySize("test"), 12819);
|
expect(await getDirectorySize("test"), 13118);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Test file info methods", () async {
|
test("Test file info methods", () async {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue