<div dir="ltr"><div><div><div><div>I loaded it in Squeak 6.0 (trunk), Pharo 6.0 (32), Squeak 5.1 all in one, Pharo 5 all in one... All the last versions. Not from ConfigurationOfCryptography (which does not exist in the repository) but <a href="http://www.squeaksource.com/Cryptography">http://www.squeaksource.com/Cryptography</a> package is Cryptography-rww.71.mcz but same error is present in Cryptography-acp.70.mcz and olders. Assume it worked in squeak 3.9 & 4 (because I used it at that point with no problems). To reproduce the error just do:<br><br>md5hash := MD5 new.<br>md5hash initializeState.<br>md5hash processBuffer: 'Casimiro de Almeida Barreto'.<br>hc := sha256hash finalHash.<br><br></div>and you´ll get the corresponding error & debug needed.<br><br></div>It is not an urgent problem (since nobody is using MD5 anymore) but I just recovered old code that used it and the error appeared. I´m using SHA256 instead and it runs OK. But it is bad to have broken code in the repository.<br><br></div>Best regards,<br><br></div>Casimiro<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-07 18:28 GMT-03:00 Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>OK,  so which MC version exactly, which image, which VM, which OS, and what step to reproduce? Is it from SqueakMap? a ConfigurationOfCryptography?<br><br></div>If I load in up-to-date trunk spur 32 bits image, for example Cryptography-rww.55 (because it has reasonnable log message),<br>then test this snippet:<br><br></div>    MD5NonPrimitive hashStream: 'foobar' readStream.<br><br></div>I get a ByteArray answer without failure:<br><br>    #[56 88 246 34 48 172 60 145 95 48 12 102 67 18 198 63]<br><br></div>same for<br>    MD5 new hashMessage: 'foo'<br><br></div>same with latest Cryptography-rww.71...<br><br><br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-06-07 22:26 GMT+02:00 casimiro barreto <span dir="ltr"><<a href="mailto:casimiro.barreto@gmail.com" target="_blank">casimiro.barreto@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">From MonticelloBrowser: <a href="http://www.squeaksource.com/Cryptography" target="_blank">http://www.squeaksource.com/Cr<wbr>yptography</a> package Cryptography<br></div><div class="m_8943332277899337187HOEnZb"><div class="m_8943332277899337187h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-06-07 17:14 GMT-03:00 Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmai<wbr>l.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>2017-06-07 21:40 GMT+02:00 casimiro barreto <span dir="ltr"><<a href="mailto:casimiro.barreto@gmail.com" target="_blank">casimiro.barreto@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>MD5 (non primitive and with primitive) is broken because it relies on the conversion of Character to SmallInteger so the method shiftBits: <br><br></div>Problem happens at ThirthyTwoBitRegister>>reverse<wbr>LoadFrom:at:<br><br></div>which is called from MD5NonPrimitive>>proccessBuffe<wbr>r:<br><br></div>Error is: Instance of Character did not understand #bitShift and happened at:<br><br>reverseLoadFrom: aByteArray at: index<br>    "Load my 32-bit value from the four bytes of the given ByteArray<br>starting at the given index. Consider the first byte to contain the most<br>significant bits of the word (i.e., use big-endian byte ordering)."<br><br>    hi := ((aByteArray at: index + 3) bitShift: 8) + ( aByteArray at: index + 2).<br>    low := ((aByteArray at: index + 1) bitShift: 8) + ( aByteArray at: index).<span class="m_8943332277899337187m_3606516883466107451m_5819105357693066307HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div><div><div><br></div></div></div></div></div></div></font></span></div></blockquote><div><br></div></span><div>Thanks for reporting. Obviously, the code expects a ByteArray, not a String, so there is some contract broken.<br><br></div><div>Could you remind me where to find/load which package?<br> <br></div><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="m_8943332277899337187m_3606516883466107451m_5819105357693066307HOEnZb"><font color="#888888"><div><div><div><div><div><div>-- <br><div class="m_8943332277899337187m_3606516883466107451m_5819105357693066307m_8188459970316380835gmail_signature">The information contained in this message is confidential and<br>intended to the recipients specified in the headers. If you received<br>this message by error, notify the sender immediately. The<br>unauthorized use, disclosure, copy or alteration of this message<br>are strictly forbidden and subjected to civil and criminal sanctions.<br></div>
</div></div></div></div></div></div></font></span></div>
<br><br>
<br></blockquote></span></div><br></div></div>
<br><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="m_8943332277899337187m_3606516883466107451gmail_signature" data-smartmail="gmail_signature">The information contained in this message is confidential and<br>intended to the recipients specified in the headers. If you received<br>this message by error, notify the sender immediately. The<br>unauthorized use, disclosure, copy or alteration of this message<br>are strictly forbidden and subjected to civil and criminal sanctions.<br></div>
</div>
</div></div><br><br>
<br></blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">The information contained in this message is confidential and<br>intended to the recipients specified in the headers. If you received<br>this message by error, notify the sender immediately. The<br>unauthorized use, disclosure, copy or alteration of this message<br>are strictly forbidden and subjected to civil and criminal sanctions.<br></div>
</div>