How to reverse operation (decryption function to encrypt function)

xiaoxiao2021-03-05  20

The function is as follows

Function DIP (str: str): string; var, str1: string; ASC, ASC1: Byte; I: integer; beginm: = 'asdfdghjvvsd'; for i: = 1 to length (str) do begin asc: = ORD ( Str [I]); ASC: = ASC AND $ F; ASC1: = ORD (M [I]); ASC1: = ASC1 and $ F; ASC1: = ASC XOR ASC1; ASC: = ORD (STR [I]) ASC: = ASC AND $ F0; ASC: = ASC ASC1; STR1: = STR1 CHR (ASC); END; RESULT: = STR1; END;

transfer

Edit2.text: = DIP (edit1.text);

The above is the decryption function, when the parameter is the character '336 (= 0 & 820 (166', the return result is an IP: 202.97.246.227

The problem is coming, how to write encryption functions, let this IP becomes 336 (= 0 & 820 (166

That is, Fun ('202.97.246.227 ") =' 336 (= 0 & 820 (166 '****************************** ***********************************************************

This encryption function is reversible, DIP ('336 (= 0 & 820 (166) =' 202.97.246.227 '

Take another DIP ('202.97.246.227') = '336 (= 0 & 820 (166' **************************** ***************************************

Encryption is just 4 digits and a secret key, then it is rehabilled in and the same key.

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

New Post(0)