A simple encryption decryption program

xiaoxiao2021-03-06  43

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));

转载请注明原文地址:https://www.9cbs.com/read-73043.html

New Post(0)