Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» cnvcl的base64单元
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: cnvcl的base64单元
npc8
灌水科科长
UID 65881
Digest Posts 0
Credits 115
Posts 37
点点分 115
Reading Access 10
Registered 2011-5-26
Status Offline
#1
Post at 2016-4-29 16:55
Profile
|
Blog
|
P.M.
cnvcl的base64单元
function Base64Encode(InputData: TStream; var OutputData: string): Byte; overload;
var
Str: TStringStream;
begin
Str := TStringStream.Create('');
try
Str.CopyFrom(InputData, InputData.Size);
Result := Base64Encode({$IFDEF UNICODE}AnsiString{$ENDIF}(Str.DataString), OutputData);
finally
Str.Free;
end;
end;
InputData中间如果某些byte是$00 会影响Str.DataString,继而出现加密错误
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2016-5-3 10:05
Profile
|
Blog
|
P.M.
我查查。
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#3
Post at 2016-5-3 16:56
Profile
|
Blog
|
P.M.
已修正。并增加了一个允许传入内存块指针与长度的方法进行Encode。麻烦从git上更新一下最新代码?
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-22 06:58
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.009156 second(s), 9 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats