C 實現 移位加密

2022-01-24 10:54:53 字數 1223 閱讀 6406

/*

filename: encrypt_string.cs

author : zhanghua

date  : 2005-08-11

fuction : input a strig  and encrypt a string

加密後的字串的第乙個字元是原先字串的最後乙個字元,

其餘的每乙個字元是對應的原字串中的前乙個字元的值加

上3。example: welcome -> ezhofrp

*/using system;

class test

\n", strinput);

//encrypt(strinput);

stroutput = encrypt(strinput);

console.writeline("stroutput is :\n", stroutput);

}private static string  encrypt(string  strinput)

\n", len);

strfont = strinput.remove(len-1,1);                                 

strend= strinput.remove(0, len-1);                                 

" strfont is : \n" , strfont);                                 

" strend is : \n" , strend);                                 

charfont = strfont.tochararray();                                 

for(i=0; i\n", intfont);                                 

charfont[i]= convert.tochar(intfont);                                   

"charfont is : \n", i, charfont[i]);                                 

}strfont = ""; //let strfont  null

for (i=0; istroutput=strend + strfont;

return stroutput;}}

C 實現 移位加密

filename encrypt string.cs author zhanghua date 2005 08 11 fuction input a strig and encrypt a string 加密後的字串的第乙個字元是原先字串的最後乙個字元,其餘的每乙個字元是對應的原字串中的前乙個字元的...

最簡單的字串加密C 實現 移位加密

filename encrypt string.cs author zhanghua date 2005 08 11 fuction input a strig and encrypt a string 加密後的字串的第乙個字元是原先字串的最後乙個字元,其餘的每乙個字元是對應的原字串中的前乙個字元的...

簡單移位加密

簡單移位加密演算法c語言實現 include include includeconst int max 100 using namespace std class samplereplace samplereplace void doencrpytograph int index,const cha...