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实现全局鼠标钩子

Delphi 自动复制到指定目录的代码

Delphi调用android振动功能

Delphi调用wmi读取usb设备的pid和vid

Delphi getprocessisadmin()判断exe是否以管理员身份启动

Delphi xe5中移动平台的字符串要注意的事项

Delphi 从文件中读取图像类型

如何在Delphi中禁用关于“返回值...可能未定义”的警告?

Delphi 利用createservice写与桌面交互的win32服务

Delphi 以低用户权限启动一个进程.比如vista或者win7中的ie

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



打赏

取消

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

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

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

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

评论

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