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

@ -6,4 +6,14 @@ void main() {
test("Test md5", () {
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");
});
}