Mantis - Squeak Packages
Viewing Issue Advanced Details
2086 Cryptography feature N/A 10-16-05 02:45 10-19-05 19:13
new 3.8  
0002086: [ENH] SHA256 for Cryptography
There is a new class SHA256. I added a testSHA256 to the CryptoTest class (the results are from: [^] . Also there was a difference and I beleive a bug in SHA1.

First, The class SHA1 is a copy of the class SecureHashAlgorithm, there is a fix in SecureHashAlgorithm which makes more sense then what is in SHA1. The problem is that the byteArray that results from SHA1 is backwards. It appears that where SHA1 was used as it required the user to reverse the byteArray and then call asInteger. This seems wrong. The better implemntation is to just return the integer instead of the backwards byte array as in SecureHashAlgorithm. Also it appears that the asByteArray of ThirtyTwoBitRegister returns backwards (but I left that).

Second, I had to change the testSHA1 methods and it would break people code that relied on the backward SHA1 class. Although I believe this is better then leaving the error. Consistency with SecureHashAlgorithm is also preferred.

Thrid, I had to add bitShift: to ThirtyTwoBitRegister to support SHA256, this change should go to the System-Digital Signatures package.

The other classes and changes should go into Cryptgraphy, I emailed Luciano Notarfrancesco but still have not recieved a reply.

 Crytpography Sha256.1.cs.gz [^] (3,836 bytes) 10-16-05 02:49

There are no notes attached to this issue.