It took two patches. I got confused with two Factor instances running when
everything seemed to work. Bah.

On Sat, Jul 9, 2016 at 2:14 PM Doug Coleman <doug.cole...@gmail.com> wrote:

> Hi Alex,
>
> I debugged it -- when adding new bytes, it was taking the length of all
> the bytes that have been added since checksumming the last block instead of
> the new bytes only. So it reports the lengths as 8, 24 instead of 8,16.
>
> This should be fixed in a patch. Sorry!
>
> Doug
>
>
> On Sat, Jul 9, 2016 at 5:36 AM Alexander Ilin <ajs...@yandex.ru> wrote:
>
>> Hello!
>>
>>   The following test is currently failing for me, although I'm not on the
>> top of the master branch.
>>   Could someone test it on the current master?
>>
>> USE: checksums.sha { t } [
>>     B{ 0 1 0 0 0 0 0 0 } B{ 1 2 3 4 5 6 7 8 }
>>     [ append sha1 initialize-checksum-state swap add-checksum-bytes
>> get-checksum ] 2keep
>>     [ sha1 initialize-checksum-state swap add-checksum-bytes ] dip
>> add-checksum-bytes get-checksum
>>     =
>> ] unit-test
>>
>>   The idea of the test is that a concatenation of the two byte-arrays
>> should produce the same hash as the individual pieces added in the same
>> sequence via add-checksum-bytes. This holds true for the openssl-sha1, but
>> not for checksums.sha:sha1.
>>
>>   Here's the same test with sha1 replaced with openssl-sha1, and it
>> passes for me:
>>
>> USE: checksums.openssl { t } [
>>     B{ 0 1 0 0 0 0 0 0 } B{ 1 2 3 4 5 6 7 8 }
>>     [ append openssl-sha1 initialize-checksum-state swap
>> add-checksum-bytes get-checksum ] 2keep
>>     [ openssl-sha1 initialize-checksum-state swap add-checksum-bytes ]
>> dip add-checksum-bytes get-checksum
>>     =
>> ] unit-test
>>
>> ---=====---
>>  Александр
>>
>>
>> ------------------------------------------------------------------------------
>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>> present their vision of the future. This family event has something for
>> everyone, including kids. Get more information and register today.
>> http://sdm.link/attshape
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to