Define TBinaryString ( = ansistring ) and use it in base64 BinaryData
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@532 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
7a5a5c150b
commit
d8690785ba
@ -274,7 +274,7 @@ type
|
||||
|
||||
TBase64StringRemotable = class(TAbstractSimpleRemotable)
|
||||
private
|
||||
FBinaryData : string;
|
||||
FBinaryData : TBinaryString;
|
||||
private
|
||||
function GetEncodedString : string;
|
||||
procedure SetEncodedString(const AValue : string);
|
||||
@ -294,7 +294,7 @@ type
|
||||
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
function Equal(const ACompareTo : TBaseRemotable) : Boolean;override;
|
||||
property BinaryData : string read FBinaryData write FBinaryData;
|
||||
property BinaryData : TBinaryString read FBinaryData write FBinaryData;
|
||||
property EncodedString : string read GetEncodedString write SetEncodedString;
|
||||
end;
|
||||
|
||||
@ -619,7 +619,7 @@ type
|
||||
|
||||
TBase64StringExtRemotable = class(TBaseComplexSimpleContentRemotable)
|
||||
private
|
||||
FBinaryData : string;
|
||||
FBinaryData : TBinaryString;
|
||||
private
|
||||
function GetEncodedString() : string;
|
||||
procedure SetEncodedString(const AValue : string);
|
||||
@ -629,7 +629,7 @@ type
|
||||
public
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
function Equal(const ACompareTo : TBaseRemotable) : Boolean;override;
|
||||
property BinaryData : string read FBinaryData write FBinaryData;
|
||||
property BinaryData : TBinaryString read FBinaryData write FBinaryData;
|
||||
property EncodedString : string read GetEncodedString write SetEncodedString;
|
||||
end;
|
||||
|
||||
|
@ -26,9 +26,9 @@ type
|
||||
TBaseXOptions = set of TBaseXOption;
|
||||
|
||||
function Base64Encode(const ALength : PtrInt; const AInBuffer) : string;overload;
|
||||
function Base64Encode(const AInBuffer : string) : string;overload;
|
||||
function Base64Encode(const AInBuffer : TBinaryString) : string;overload;
|
||||
|
||||
function Base64Decode(const AInBuffer : string; const AOptions : TBaseXOptions = [xoDecodeIgnoreIllegalChar]) : string;
|
||||
function Base64Decode(const AInBuffer : string; const AOptions : TBaseXOptions = [xoDecodeIgnoreIllegalChar]) : TBinaryString;
|
||||
|
||||
resourcestring
|
||||
s_InvalidEncodedData = 'Invalid encoded data.';
|
||||
@ -111,7 +111,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function Base64Encode(const AInBuffer : string) : string;
|
||||
function Base64Encode(const AInBuffer : TBinaryString) : string;
|
||||
begin
|
||||
if ( Length(AInBuffer) = 0 ) then
|
||||
Result := ''
|
||||
@ -119,7 +119,7 @@ begin
|
||||
Result := Base64Encode(Length(AInBuffer),AInBuffer[1]);
|
||||
end;
|
||||
|
||||
function Base64Decode(const AInBuffer : string; const AOptions : TBaseXOptions) : string;
|
||||
function Base64Decode(const AInBuffer : string; const AOptions : TBaseXOptions) : TBinaryString;
|
||||
var
|
||||
locBuffer : PByte;
|
||||
locInLen, locInIndex, i, locPadded : PtrInt;
|
||||
|
@ -100,7 +100,7 @@ type
|
||||
AVisibility : TPasMemberVisibility;
|
||||
const ASourceFilename : String;
|
||||
ASourceLinenumber : Integer
|
||||
): TPasElement;override;overload;
|
||||
): TPasElement;overload;override;
|
||||
function CreateArray(
|
||||
const AName : string;
|
||||
AItemType : TPasType;
|
||||
|
@ -20,6 +20,9 @@ interface
|
||||
|
||||
type
|
||||
|
||||
{ reprents an array of Byte }
|
||||
TBinaryString = ansistring;
|
||||
|
||||
{ TDataObject }
|
||||
|
||||
TDataObject = class
|
||||
|
Loading…
Reference in New Issue
Block a user