首先有两个自定的转换函数: function myStrToHex(s:string):string; //字串转16进制 var TmpStr:string; i:integer; begin TmpStr:=''; for i:=1 to Length(s)do TmpStr:=TmpStr+IntToHex(ord(s[i]),2); Result:=TmpStr; end; function myHexToStr(S:string):string; //16进制转字串 var HexS,
From http://www.delphigeist.com/2009/09/text-encryption-with-xor.html Text encryption with XOR Ever wanted to encrypt a text message?In order to do that we need some helper functions like transforming the string to it's hex representation after en