• 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;
    
    New: System.NetEncoding
  • 相关阅读:
    Redis(二)
    Redis(一)
    MyBatis--一级二级缓存
    MySQL优化
    HashMap
    ArrayList
    常用框架注解说明
    Linux常用基础命令
    SpringCloud--gateway路由配置
    JetBrains系列软件的插件安装
  • 原文地址:https://www.cnblogs.com/del/p/1602583.html
Copyright © 2020-2023  润新知