中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 加密程序的自解密程序編寫

        加密程序的自解密程序編寫

        作者: 時間:2010-09-16 來源:網(wǎng)絡(luò) 收藏

          ch=chpassword[i];

          ch+=I;

          ch=nch; /*將此字符同密碼i值進行運算后寫入fp2指定文件*/

          fputc(ch,fp2);

          }

          }While(!feof(fp1));

          fcloseal?;

          }

          第二個源代碼文件main2.c

          #include “stdio.h

          #include “string.h

          main(int argc,char *argv[])

          {FILE *FP0,*FP1;

          char *password,old password[10],str[10],ch,I;

          if(argc!=2)

          {printf(“Usage=%s,argv[0]);

          exit(o);

          }

          fseek(fp0,16888L,SEEK_SET); /*同理16888也視實際情況而定*/

          fgetc(fp0); /*讀掉一個無效字符*/

          for(i=0;(oldpassword[i]=fget((fp0))!=`10`;i++)

          Oldpassword[i]=(oldpassword[i]i)-I; /*對密碼進行還原*/

          oldpassword[i]=`10`; /*把“10”藏于密碼后 */

          password=(char *)getpass(“please input password:);

          for(i=0;I  {if(strcmp(password,oldpassword))

          {password=(ch *)getpass(“

          password is wrong.

          please input agai:);

          if(i==2)

          {printf(“

          press any Key to exit……

          );

          getch();exit(o)

          }

          }

          }/*對密碼進行判斷,有三次機會,都不正確則返回到操作系統(tǒng)*/

          do{

          for (i=0;password[i]!=`10`;i++)

          {ch=fgetc(fp0);

          if(feof(fp0))break;

          ch=nch;

          ch-=I;

          ch=password[i];

          }

          }while(!feof(fp0);

          fcloseal?;

          {

          上述在COMPAQ 586.TC2.0集成環(huán)境里通過。


        上一頁 1 2 下一頁

        關(guān)鍵詞: 程序 編寫 解密 加密

        評論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉