I have a declared variable in my code like so:
Var
VarName:Array[0..693] of Byte = ( and my array here );
I have EncdDecd in my uses..
I am looking to encode this Array of Byte into a base64 string using the EncodeBase64 function in EncdDecd.pas
But I am unsure of how to return it into a nice and pretty b64 string that can be converted directly back into a byte array with DecodeBase64...
I have tried a few different approaches..
Var Res:PWideChar;
begin
StringToWideChar(EncodeBase64(@VarName, 693), Res, 693);
ClipBoard.SetTextBuf(Res);
end;
Access Violation with that code...
Also tried:
begin
ClipBoard.SetTextBuf(PWideChar(EncodeBase64(@VarName, 693)));
end;
Which returns a string full of distorted Chinese symbols....
Any help on returning this string would be greatly appreciated..
Thanks!