Closed timosturm closed 4 years ago
String type = "SHA-1"; Uint8List hash = Digest(type).process(Uint8List.fromList([0, 0, 0, 0, 0, 0, 0, 0])); print('$hash');
Version: 1.6.1
1.6.1
Expected: [5, 254, 64, 87, 83, 22, 111, 18, 85, 89, 231, 201, 172, 85, 134, 84, 241, 7, 199, 233]
[5, 254, 64, 87, 83, 22, 111, 18, 85, 89, 231, 201, 172, 85, 134, 84, 241, 7, 199, 233]
Actual: [9, 62, 67, 119, 176, 114, 197, 97, 221, 184, 28, 162, 131, 250, 208, 153, 50, 219, 150, 148]
[9, 62, 67, 119, 176, 114, 197, 97, 221, 184, 28, 162, 131, 250, 208, 153, 50, 219, 150, 148]
The SHA-1 hash is used as a checksum and the calculated checksum from this library is different to the one calculated by MessageDigest on android and pointycastle 1.0.2.
Thanks for the help! I found the issue, will publish an update later today.
This is finished and published to GitHub and Pub. Thanks for reporting...
Version:
1.6.1
Expected:
[5, 254, 64, 87, 83, 22, 111, 18, 85, 89, 231, 201, 172, 85, 134, 84, 241, 7, 199, 233]
Actual:
[9, 62, 67, 119, 176, 114, 197, 97, 221, 184, 28, 162, 131, 250, 208, 153, 50, 219, 150, 148]
The SHA-1 hash is used as a checksum and the calculated checksum from this library is different to the one calculated by MessageDigest on android and pointycastle 1.0.2.