On Fri, Sep 5, 2008 at 12:56 AM,  <toad at freenetproject.org> wrote:
> Author: toad
> Date: 2008-09-04 16:56:06 +0000 (Thu, 04 Sep 2008)
> New Revision: 22422
>
> Modified:
>   trunk/freenet/src/freenet/support/Fields.java
> Log:
> bytesToInts was broken, ouch!
>

This would break backward-compatibility.

0) MT(byte[] seed) use bytesToInts to initialize the seed
1) CHK@ padding use MT(digest) to pad
2) BloomFilter use MT(key) for the hashes



> Modified: trunk/freenet/src/freenet/support/Fields.java
> ===================================================================
> --- trunk/freenet/src/freenet/support/Fields.java       2008-09-04 16:56:04 
> UTC (rev 22421)
> +++ trunk/freenet/src/freenet/support/Fields.java       2008-09-04 16:56:06 
> UTC (rev 22422)
> @@ -538,7 +538,7 @@
>                for(int i = 0; i < ints.length; i++) {
>                        int x = 0;
>                        for(int j = 3; j >= 0; j--) {
> -                               int y = (buf[j + offset] & 0xff);
> +                               int y = (buf[j + offset + i * 4] & 0xff);
>                                x = (x << 8) | y;
>                        }
>                        ints[i] = x;
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>

Reply via email to