Function addpassword (str: string): String; var text, str1: string; i, j: integer; begin if str = '' Then Begin Result: = '; exit; end; text: =' zxb '; // Encryption factor, you can set up STR1: = ''; for i: = 1 to length (str) do begin j: = i mod length (text) 1; str1: = str1 chr (ORD (STR [i] ) XOR ORD (Text [J]) MOD 10); END; Result: = Str1; End;
/ / -------------------------------------------------------------------------------------------- ----------------
Encryption edit2.text: = addpassword (Trim (edit1.text));
Decryption edit3.text: = addpassword (Trim (edit2.text));