Encoding and Decoding in logic app

ankit kumar 101 Reputation points
2020-10-07T13:01:02.293+00:00

I am looking equivalent function encoding decoding my content for content-Md5 property of my blob. I tried Base64ToString and I get this

  • O؈�T�eK̲; x���*

See the sample code in c# below. I am looking to achieve same functionality for my input in logic app:

var hashStr = "INDiTF0Nq8hU6d4fHqu1dQ==";
var hash = Convert.FromBase64String( hashStr );
var sb = new StringBuilder();

foreach( var b in hash )
{
    sb.Append( b.ToString("X2") );
}
sb.ToString().Dump();

I get output as 20D0E24C5D0DABC854E9DE1F1EABB575

How to built dynamic expression to get same output in logic app when I have my string value "INDiTF0Nq8hU6d4fHqu1dQ=="

Note: remember the format is "X2"

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,075 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,126 Reputation points
    2020-10-08T06:07:36.283+00:00

    Hi @ankit kumar

    The supported encoding is listed here. I don't see the inbuilt functions that can help you in this case. You either need to call the function app from the logic app that will process your request or use the inline code. If you want to proceeds with the inline code then, please refer to the inline code article as the only language supported is javascript and global object that is available in javascript.

    Feel free to reach out to me if you have any queries or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.