Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ye

Name: Anonymous 2010-09-25 22:03

sup /prog/

what do you think of my checksum algorithm?

int PrimeSum(char* buffer, int start, int size)
{
     int sum = 1;
     int prime = 0x2468ACF0;

     for (int i = start; i < (start + size); i++)
     {
          sum ^= ((sum << 8) | buffer[i]) * prime;
     }
    
     return sum;
}

Name: Anonymous 2010-09-26 10:10

>>7
//echo $factor($base(2468ACF9,16,10))
[1, 610839801], [3, 203613267], [9, 67871089], [11, 55530891], [13, 46987677], [17, 35931753], [33, 18510297], [39, 15662559], [51, 11977251], [99, 6170099], [117, 5220853], [143, 4271607], [153, 3992417], [187, 3266523], [221, 2763981], [429, 1423869], [561, 1088841], [663, 921327], [1287, 474623], [1683, 362947], [1989, 307109], [2431, 251271], [7293, 83757], [21879, 27919]

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List