<div dir="auto">Hi Jeroen,</div><div dir="auto">I just tried it on mac with the latest Cuis and I get the same results as you. However, using MD5NonPrimitive instead of MD5 I get the correct result (note that you will get a message not understood exception, because it sends the message #doWithIndex: that doesn’t exist, you just need to replace it with #withIndexDo:).</div><div dir="auto"><br></div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Nov 9, 2025 at 05:53 Jeroen Kouwer via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Hello,<br>
<br>
I'm new to this list and new to Smalltalk development. I'm a software <br>
engineer by profession and grew up with Unix (SVR4), Pascal and C. Since <br>
then I've moved to Linux, Java and C++ and although I've read about <br>
Smaltalk and I have been intrigued with the idea behind it, I've never <br>
actually programmed in it.<br>
<br>
Until now.<br>
<br>
I've started The Cuis Book, together with the SBE and the Cuis Cook <br>
Book, and am currently trying to solve the first year of the Advent of <br>
Code (2015) in Smalltalk (the Cuis version [1]). The first three days <br>
went really well. The challenge came on day four: having to use MD5 hash <br>
calculation. Cuis, out of the box, doesn't come with an MD5 class. A <br>
little searching led me to the Cryptography package [2] and I installed <br>
the package using the File List.<br>
<br>
Side note: This package does not define a feature, so when next starting <br>
the image (provided having saved it) it throws you into the debugger. <br>
The package is recognized, but when checking for new versions it finds <br>
out that there's no feature defined (nil is not a valid feature) and <br>
this part of opening the image cannot handle that:<br>
```<br>
UndefinedObject(Object)>>doesNotUnderstand: #isLaterThan:<br>
[] in ChangeSet class>>installNewUpdates:<br>
...<br>
```<br>
However, this can be solved by saving the package (open Installed <br>
Packeges); saving the package apparently adds the category as feature to <br>
the *.<a href="http://pck.st" rel="noreferrer" target="_blank">pck.st</a>.<br>
<br>
Back to Cryptography and feature Cuis-System-Hashing (from the <br>
Cryptography package [2]): I cannot get the MD5 class to behave as I <br>
expect it to behave. I expect that each call to hashMessage with the <br>
same message results in the same hash, which it does in Squeak and Pharo <br>
(after some frustration I did some checking).<br>
<br>
After having loaded the package for the first time and executing it the <br>
results are as expected:<br>
```<br>
((MD5 new) hashMessage: 'abcdef609043') hex.<br>
'000001DBBFA3A5C83A2D506429C7B00E' .<br>
```<br>
Executing it a second time results in:<br>
```<br>
((MD5 new) hashMessage: 'abcdef609043') hex.<br>
'D1CE4AB38D6D9DC0E1FF789725EFA294' .<br>
```<br>
Each consecutive execution results in a different value, which is not <br>
what I expected!<br>
<br>
(I've managed to solve day four by resorting to Squeak :o, sorry...)<br>
<br>
Does anyone has an idea why this calculation keeps on producing new <br>
values on each execution?<br>
<br>
Regards,<br>
Jeroen Kouwer<br>
<br>
P.S. I have observed the same behavior with Cuis 7.2 [3]<br>
<br>
<br>
[1] <a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" rel="noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a><br>
<br>
[2] <a href="https://github.com/garduino/Cuis-Smalltalk-Cryptography" rel="noreferrer" target="_blank">https://github.com/garduino/Cuis-Smalltalk-Cryptography</a><br>
<br>
[3] <a href="https://github.com/Cuis-Smalltalk/Cuis7-2" rel="noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis7-2</a><br>
<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>