Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string DoCrupt(string Text1, bool cry) //зашифровать (расшифровать) пароль
- {
- string cpass = "";
- string rab = "kgkykdmvbgk6894jk5jflhjh12ykjfhgmv89vjdltkdjhgpyjdhy67hhl789123dnh6789";
- if ( cry) //шифровать
- {
- if (Text1.Length <= rab.Length) //
- {
- for (int i = 0; i < Text1.Length; i++)
- {
- cpass = cpass + Text1[i] + rab[i];
- }
- }
- else cpass = Text1; //вернуть не шифрованный
- }
- if (!cry) //расшифровать
- {
- if (Text1.Length <= (rab.Length * 2)) //
- {
- for (int i = 0; i < Text1.Length; i++)
- {
- cpass = cpass + Text1[i];
- i++;
- }
- }
- else cpass = Text1; //вернуть не шифрованный
- }
- return cpass;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement