Skip to content

Instantly share code, notes, and snippets.

@MySohoWiki
Created October 26, 2022 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MySohoWiki/c54eec1ead55ab791c054c348ee6cc82 to your computer and use it in GitHub Desktop.
Save MySohoWiki/c54eec1ead55ab791c054c348ee6cc82 to your computer and use it in GitHub Desktop.
Create base64
function base64(user, pass, sn:string): string;
begin
result:= 'Basic '+ Prg.QueryValues('Select x.A from'
+' (SELECT CAST(:0 as varbinary(max)) FOR XML PATH(''''), BINARY BASE64) x(A)', user+':'+pass+'#'+sn);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment