delphi 异或加解密


本文整理自网络,侵删。

 function Int_encrypt(s:string; lkey : Integer):string;
begin
  //大于5位乘87209会有问题,改成乘以13可以支持8位
  //Result := IntToStr(StrToInt(s) xor (lkey * 4356));
  if lkey > 9999 then
    Result := IntToStr(StrToInt(s) xor (lkey * 13))
  else
    Result := IntToStr(StrToInt(s) xor (lkey * 4356));
end;
 
 
function Int_decrypt(s:string; lkey : Integer):string;
begin
  if lkey > 9999 then
    Result := IntToStr(StrToInt(s) xor (lkey * 13))
  else
    Result := IntToStr(StrToInt(s) xor (lkey * 4356));
end;
 
――――――――――――――――

原文链接:https://blog.csdn.net/y281252548/article/details/116126655

相关阅读 >>

Delphi中将dbgrid中的内容输出到word中

Delphi webbrowser1 缩放网页

Delphi中time消息的使用方法

Delphi 中 16 进制转换为 10 进制

Delphi 获取硬盘序列号(ide,sata,scsi)

Delphi savelog 方便的记录日志

Delphi 标头控件(theadercontrol)中的显示复选框

Delphi 获取文件crc和md5

Delphi检测当前鼠标点击处是否在指定控件内部

Delphi 文本列数值排序从小到到

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...