Cryptography actions with Hashing in Desktop flow using Microsoft Power Automate

Microsoft Power Automate is a software by Microsoft for the automation of recurring tasks. It is part of the Microsoft Power Platform line of products together with products such as Power Apps and Power BI. More Details https://powerautomate.microsoft.com/en-us/

Desktop flows are the existing robotic process automation (RPA) capabilities in Power Automate and enable to automate of all repetitive desktop processes.

Cryptography actions enable you to encrypt and decrypt plain text and text from files providing a key and an encoding format. For hashing, Hash text action, Hash from file action, Hash text with key action, and Hash from file with key action are to be used with a specified algorithm and an encoding format.

Reading this article, you can learn how to apply to Hash using Hash text action, Hash from file action, Hash text with key action, and Hash from file with key action with the Desktop flow in Microsoft Power Automate.

The following important tools are required for developing Microsoft Power Automate,

  1. Windows 10/11 (Recommended)
  2. Power Automate Desktop - Download the Power Automate installer

Now we can discuss step-by-step App development.

Step 1. Open Microsoft Power Automate ->  New Flow

Next, Give the Flow name as PADHash, Click the Create button,

After that, we can see the Desktop flow,                                                                       

Step 2. For Testing Cryptography actions with Hash,

For Hash a string, add the Hash text action, and Set the Hash Algorithm  parameter as SHA256, Encoding parameter as Unicode, Text to the Hash parameter as Welcome to C# Corner, Variable produced as HashedText, and Click Save Button

For Displaying the Hash Text output, Add the Display message action, Set the Message box title Parameter value as DispHashText, Message to display Parameter value as %HashedText% and Click Save Button

For Hash, the contents of a file, add the Hash from file action and Set the Hash Algorithm parameter as SHA256, Encoding parameter as Unicode , File to the hash parameter as <File Path>, Variable produced as HashedText2 and Click Save Button

For Displaying the Hash from file output, Add the Display message action, Set the Message box title Parameter value as  DispHashFile, Message to display Parameter value as %HashedText2%, and Click Save Button

For Hash a string with a key, add the Hash text with key action, and Set the Hash Algorithm parameter as HMAC SHA256, Encoding parameter as Unicode, Text to the Hash parameter as Welcome to C# Corner, Hash Key parameter as test, Variable produced as HashedText3 and Click Save Button

For Displaying the Hash text with key output, Add the Display message action, Set the Message box title Parameter value as DispHashTextKey, Message to display Parameter value as %HashedText3%, and Click Save Button

For Hash, the contents of a file with a key, add the Hash from the file with key action, and Set the Hash Algorithm parameter as HMAC SHA256, Encoding parameter as Unicode, File to the hash parameter as <File Path>, Hash Key parameter as a test, Variable produced as HashedText4 and Click Save Button

For Displaying the Hash from the file with key output, Add the Display message action, Set the Message box title Parameter value as DispHashFileKey, Message to display Parameter value as %HashedText4%, and Click Save Button

Now, Save the PADHash Desktop Flow,

Step 3. Now we can run your PADHash Desktop Flow in Microsoft Power Automate, 

The output of the PADHash, For Hash a String, is,

For Hash, the contents of a file are,

For Hash, a string with a key is,

For Hash, the contents of a file with a key are,

Summary

You have successfully tested Cryptography actions with Hashing in Desktop flow – PADHash in Microsoft Power Automate. 


Similar Articles