虫虫首页|资源下载|资源专辑|精品软件
登录|注册

您现在的位置是:虫虫下载站 > 资源下载 > CA认证 > DESProcess FILE *mfp,*cfp int ttch=0,xorRes,ttbitdiff=0 char mch,cch float bdiff=0 if

DESProcess FILE *mfp,*cfp int ttch=0,xorRes,ttbitdiff=0 char mch,cch float bdiff=0 if

  • 资源大小:6 K
  • 上传时间: 2016-07-02
  • 上传用户:pipiooxx
  • 资源积分:2 下载积分
  • 标      签: DESProcess ttbitdiff xorRes bdiff

资 源 简 介

DESProcess FILE *mfp,*cfp int ttch=0,xorRes,ttbitdiff=0 char mch,cch float bdiff=0 if((mfp=fopen(mfile,"r"))==NULL) {cout<<"Cannot open the file to compare"<<endl } if((cfp=fopen(cfile,"r"))==NULL) {cout<<"Cannot open the file to compare"<<endl } else { while(!feof(mfp)&!feof(cfp)) { ttch++ mch=fgetc(mfp) cch=fgetc(cfp) xorRes=mch^cch ttbitdiff+=(xorRes&1)+(xorRes&2)/2+(xorRes&4)/4+(xorRes&8)/8+(xorRes&16)/16+(xorRes&32)/32+(xorRes&64)/64+(xorRes&128)/128 } bdiff=float(ttbitdiff)*100/float(ttch*8) } *bitdiff8byte=float(ttbitdiff)*100/float(8*8) return bdiff

相 关 资 源