How to convert Hexadecimal to Base64

Hello everyone,

I did a codeunit that converts string to hexadecimal.
How can I convert the hexadecimal to Base64?

Thanks!

Answers

  • txerifftxeriff Member Posts: 401
    Can you try this?
      var
            TempBlob: Record TempBlob;
        begin
            TempBlob.WriteAsText(StrSubstNo('%1:%2', UserName, Password), TextEncoding::UTF8);
            exit(StrSubstNo('Basic %1', TempBlob.ToBase64String()));
        end;
    

  • MohammadGhazzawiMohammadGhazzawi Member Posts: 2
    Thanks for you reply!
    This code convert the text to Base64.
    I need to convert the Hex to Base64.

    Thanks
Sign In or Register to comment.