CnPack Forum

#1 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({ UNICODE}AnsiString{}(Str.DataString), OutputData);
finally
Str.Free;
end;
end;

InputData中间如果某些byte是$00 会影响Str.DataString，继而出现加密错误
4/29 16:55
npc8

#2
..

#1 >>Next Page

Forum:CnPack IDE 专家包（CnW ...
Thread:cnvcl的base64单元
Next Thread:Rad Studio 10.1 Berl ...

Home
Login

Powered by Discuz!