Remove hash check, and document packet format inbound and out

This commit is contained in:
zontreck 2024-08-29 18:46:56 -07:00
parent d1ff953717
commit a126358c5f
4 changed files with 67 additions and 52 deletions

View file

@ -1,3 +1,6 @@
import 'dart:typed_data';
import 'package:libac_dart/nbt/Stream.dart';
import 'package:libac_dart/utils/Hashing.dart';
import 'package:test/expect.dart';
import 'package:test/scaffolding.dart';
@ -8,8 +11,12 @@ void main() {
});
test("Test sha256", () {
List<int> hsh = Hashing.sha256Sum([0x0A, 0x0B]);
print("Sha256 Length: ${hsh.length}");
Uint8List hsh = Uint8List.fromList(Hashing.sha256Sum([0x0A, 0x0B]));
print("Sha256 Length: ${hsh.lengthInBytes}");
ByteLayer layer = ByteLayer();
layer.writeBytes(hsh);
print("Layer length: ${layer.bytes.lengthInBytes}");
print("Sha256 Hash: ${Hashing.bytes2Hash(hsh)}");