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 “invalid floating point operation.”错误的解决方法

Delphi idhttpserver接收http get请求解码问题

Delphi 打开android应用信息

Delphi fmx listbox长按复制(移动平台)

Delphi中的进制转换

Delphi f1026 file not found: ''quickrpt.dcu''解决方法

Delphi 网卡工作状态检测

Delphi api: setwindowpos改变窗口的位置与状态

Delphi 泛型数组 strsplit 字符串分割

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



打赏

取消

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

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

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

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

评论

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