// Goal: Calculate the hash value
// Output: RM (hash value)
-
-// uchar *X=new uchar[h2];
-// uchar *fX=new uchar[h2];
uchar X[h];
int ind1,ind2;
for(int it=0;it<len;it++) {
- //ind1=Pbox[it]*h;
- //ind2=Pbox[(it+len/2)]*h;
ind1=(it*h)>>3;
// Mix with dynamic RM
for(int a=0;a<(h>>3);a++) {
rm[a]=rm[a]^ss[ind1+a];
- sum+=rm[a];
+ sum^=rm[a];
}
rm[0]=xorshift64(sum);
for(int a=1;a<(h>>3);a++) {
- rm[a]^=xorshift64(rm[a-1]);
- //rm[a]^=splitmix64(rm[a-1]);
+ rm[a]=xorshift64(rm[a-1]);
+ //rm[a]=splitmix64(rm[a-1]);
}
if(change==1) {
seq[4]++;
+ seq[5]--;
}
if(change==2) {
seq[9]++;
+ seq[10]--;
}
printf("seq 4 %d\n",seq[4]);