Home > database >  Pb decryption algorithm implementation
Pb decryption algorithm implementation

Time:01-25

Excuse me the bosses I want to use pb decryption algorithm to implement the following should be how to write?
The code is as follows:
Private string DecryptString (string EncryptString)
{
String DecryptString="";
Int n=0;
If (EncryptString. Length & gt; 100)
{
MessageBox. Show (" password length should not exceed 100!" , "tip", MessageBoxButtons. OK, MessageBoxIcon. Information);
return "";
}
for (int i=0; I & lt; EncryptString. Length; I++)
{
If (I % 2==0)
N=EncryptString [I] + I - 7;
The else
N=EncryptString [I] -i + 31;
DecryptString=DecryptString + (char) n;
}
Return DecryptString;
}
  • Related