德尔福7 - 德code Base64编码字符串的字节数组

问题描述:

我想提出一个建设者/存根应用。建设者在XE2 codeD,而存根是在Delphi 7 codeD。

I am making a builder/stub application. The builder is coded in XE2 while the stub is coded in Delphi 7.

在XE2当我用EncdDecd它有功能连接code恩codeBase64和德codeBase64。
但是在Delphi 7,当我使用EncdDecd它不具备的德codeBase64功能,我需要的。

In XE2 when I use "EncdDecd" it has functions to encode EncodeBase64 and DecodeBase64. But in Delphi 7 when I use EncdDecd it does not have the DecodeBase64 function that I need.

在我的助洗剂我加载一个文件到一个流,并将其编码到B64 AnsiString类型和它添加到存根的资源。我们的目标是有存根去code此B64 AnsiString类型到字节数组中,并最终将其写入到磁盘上的文件。

In my builder I am loading a file into a stream and encoding it to a B64 AnsiString and adding it to the resources of the stub. The goal is to have the stub decode this B64 AnsiString into a byte array and ultimately write it to a file on the disk.

从V6起船德尔福的所有版本与印preinstalled。它的标识coderMIME 单元有 TIdEn coderMIME TIdDe coderMIME 类编码/解码的base64内容。

All versions of Delphi from v6 onward ship with Indy preinstalled. Its IdCoderMIME unit has TIdEncoderMIME and TIdDecoderMIME classes for encoding/decoding base64 content.