Delphi 字符串加密与解密函数


本文整理自网络,侵删。

 
EncdDecd 单元: EncodeString、DecodeString、EncodeBase64、DecodeBase64

uses EncdDecd;

const str = '万一的 Delphi 博客';

procedure TForm1.Button1Click(Sender: TObject);
var
  strEncode,strDecode: string;
begin
  strEncode := EncodeString(str);
  strDecode := DecodeString(strEncode);
  ShowMessageFmt('%s'#10#13'%s', [strEncode, strDecode]);
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  strEncode,strDecode: string;
begin
  strEncode := EncodeBase64(BytesOf(str), Length(BytesOf(str)));
  strDecode := StringOf(DecodeBase64(strEncode));
  ShowMessageFmt('%s'#10#13'%s', [strEncode, strDecode]);
end;

相关阅读 >>

Delphi隐藏当前进程(新)

Delphi改变图片的像素,即大小

屏幕抓取Delphi

Delphi 过卡巴2009和沙盘启发杀毒的Delphi源代码

Delphi 读取全网站链接

Delphi 指定在ie浏览器或ie内核打开链接

Delphi emptyrecycle() 清空回收站

Delphi xe 新功能试用:多种皮肤样式静、动态设置方法

Delphi发送邮件

Delphi 调用viewer-windows10 图像浏览器

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



打赏

取消

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

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

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

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

评论

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