Closed andromeda911 closed 1 year ago
Hi,
Thanks for the report..
Hi,
I have been unable to reproduce this on the 3.6.2 code base.
Using (Dart SDK version: 2.18.4 (stable) (Tue Nov 1 15:15:07 2022 +0000))
var dig = RIPEMD160Digest();
var msg = Uint8List.fromList("helloworld".codeUnits);
print("Message: "+hex.encode(msg));
var digest = dig.process(msg);
print("Digest: "+hex.encode(digest));
I get on the 3.6.2 code base:
Message: 68656c6c6f776f726c64
Digest: 8a73c5438c28e79e696144fa869886f240cfaddb
If you have a moment could you trying decoding the Message from above and passing that to the digest eg:
createUint8ListFromHexString("68656c6c6f776f726c64")
Before we go diving into the digest implementation we need to rule out that "helloworld".codeUnits
is not generating a different encoding of code points because of locale or some other factor.
MW
Hi.
I downloaded the pointycastle source code from pub.dev for both versions. Instead of the message "helloworld" used an array of 10 digits. I still get different results:
var message = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
var digest = RIPEMD160Digest().process(Uint8List.fromList(message));
print(hex.encode(digest));
Outputs:
99cf493cd47cea163f2872fd7ab15b8668562b96 - v.3.6.1 e5381dc55b3ab503a5044a95108ac7b94a0e30f4 - v.3.6.2
Running on Dart SDK version: 2.18.4 (stable) (Tue Nov 1 15:15:07 2022 +0000) on "windows_x64"
So here is pubspec.lock file for 3.6.2, mb it can help:
Thanks.
Hi,
Thanks for the extra information, using the source from pub.dev I set up both source bundles and using the array based example you supplied I was unable to generate an differeing digest.
I also upgraded the dependencies for the both and was sill able to generate the same digest, namely:
99cf493cd47cea163f2872fd7ab15b8668562b96
I also tried it with BC-JAVA and OpenSSL and got the above result for all.
So at this point I am unable to reprodce the issue.
MW
Reinstall flutter helps. Thanks and sorry for wasted time. GL
Hi!
RIPEMD160Digest results in last version(3.6.2) are incorrect. Version 3.6.1 is great.
Example:
I looked at the commits, and it's probably the updated dependencies that are the problem?
Thanks.