Hi Marcel,
On 2023. 04. 11. 14:01, Marcel Taeumel via Squeak-dev wrote:
Hi Levente --
+1
Considering backwards compatibility, you could retain #md5HashStream: and create and use a new #md5HashStreamReversed:.
Actually #md5HashStream: returns the hash in reversed order. I created a new method and deprecated this one in WebClient-Core-ul.132.
Considering ByteString-to-ByteArray conversion, you could also use #changeClassTo: before and after the computation. I documented this pattern in #utf8Decoded and #utf8Encoded.
Yes, but it's not needed, because ByteArray's #replaceFrom:to:with:startingAt: explicitly supports ByteString arguments. However, that gave me an idea to further speed up MD5, and the new version in the Inbox is really fast. Hopefully it's correct as well. :)
Levente
Best, Marcel