德尔福7 - 德code Base64编码字符串的字节数组 [英] Delphi 7 - Decode Base64 String to Byte Array

查看:595
本文介绍了德尔福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.

这篇关于德尔福7 - 德code Base64编码字符串的字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆