jl777 7 years ago
parent
commit
d1248a70ec
  1. 14
      iguana/exchanges/LP_privkey.c

14
iguana/exchanges/LP_privkey.c

@ -489,7 +489,7 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
if ( (val & 1) != 0 )
SETBIT(decoded,(*capacityp));
//decoded[(*capacityp) >> 3] |= (1 << ((*capacityp)&7));
printf("%c",(val&1)!=0?'1':'0');
//printf("%c",(val&1)!=0?'1':'0');
}
(*capacityp)++;
}
@ -498,7 +498,7 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
}
}
}
printf(" capacity %d required.%d power2.%d limit.%d\n",*capacityp,required,power2,limit);
//printf(" capacity %d required.%d power2.%d limit.%d\n",*capacityp,required,power2,limit);
if ( *capacityp > required && outputfname != 0 && outputfname[0] != 0 )
{
if ((output_file = fopen(outputfname, WRITE_BINARY)) == NULL) {
@ -525,7 +525,7 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
val &= ~1;
if (GETBIT(data,emit) != 0 )//|| (emit >= required && (rand() & 1) != 0) )
val |= 1;
printf("%c",(val&1)!=0?'1':'0');
//printf("%c",(val&1)!=0?'1':'0');
coef_buffers[compnum][rownum][blocknum][i] = val;
emit++;
}
@ -534,7 +534,7 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
}
}
}
printf(" emit.%d\n",emit);
//printf(" emit.%d\n",emit);
// Output the new DCT coeffs to a JPEG file
modified = 0;
for (compnum=0; compnum<num_components; compnum++)
@ -584,9 +584,9 @@ char *LP_jpg(char *srcfile,char *destfile,int32_t power2,char *passphrase,char *
data = calloc(1,len);
decode_hex(data,len,datastr);
required = len * 8;
int32_t i; for (i=0; i<required; i++)
printf("%c",'0'+(GETBIT(data,i)!=0));
printf(" datastr.%d %s\n",required,datastr);
//int32_t i; for (i=0; i<required; i++)
// printf("%c",'0'+(GETBIT(data,i)!=0));
//printf(" datastr.%d %s\n",required,datastr);
}
}
if ( required > 0 )

Loading…
Cancel
Save