web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Decrypt a string using...
Power Automate
Unanswered

Decrypt a string using PAD

(0) ShareShare
ReportReport
Posted on by 18,136 Super User 2026 Season 1

Hi everyone,

 

I have a question, how to decrypt a string using AES GCM algorithm via power automate desktop ?

 

 

I have the same question (0)
  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    Try this:

    Kaif_Siddique_0-1681256678997.png

     

    SET strVal TO $'''Power Automate'''
    Cryptography.EncryptText.EncryptTextWithAES Encoding: Cryptography.EncryptionEncoding.Unicode TextToEncrypt: strVal EncryptionKey: P'AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAYzwEO1cfH0CvaLEw5CgHAgQAAAACAAAAAAADZgAAwAAAABAAAAA0lxBdhorWQpIZzYVTpII+AAAAAASAAACgAAAAEAAAADjJe7qJVPXDgIQjXv6e2dQQAAAAi5oZd0lgPHVqjIxH6Bh/iRQAAAABDgKOuNIFNGOL3JdOj5vPhnP05Q==' PaddingMode: Cryptography.PaddingMode.PKCS7 KeySize: Cryptography.AESKeySize.Bits256 EncryptedText=> EncryptedText
    Cryptography.DecryptText.DecryptTextWithAES Encoding: Cryptography.EncryptionEncoding.Unicode TextToDecrypt: EncryptedText DecryptionKey: P'AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAYzwEO1cfH0CvaLEw5CgHAgQAAAACAAAAAAADZgAAwAAAABAAAAAQAX0fYP/sEiZOkK/8XXUmAAAAAASAAACgAAAAEAAAAKdUtkXrqT4Tl0N2ucDddxMQAAAA8v5X65nioky/W6Vz4gZ8axQAAAAzmQxEB4h0uGp8WRCkjzG7sk0roQ==' Padding: Cryptography.PaddingMode.PKCS7 KeySize: Cryptography.AESKeySize.Bits256 DecryptedText=> DecryptedText
    

    Encryption key is Direct password input. Change to desire password.

    Kaif_Siddique_1-1681256794478.png

     

    Regards

    Kaif

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Kaif_Siddique 

     

    sorry for late response, actually this did not help me up. 

     

    Currently i already have encrypted string which i need to decrypt, key is already provided as well. 

     

    You can refer the website https://botsdna.com/RemoteDesktop/

    to try around 

     

    Here copy the secure string from any of cells from Encrypted Password column and you will get the secure code string which needs to decrypted.

    Nived_Nambiar_0-1695464738683.png

     

     

     

    I tried different approaches but still not get out how to solve this question. I have developed the same use case mentioned in UiPath, there we can decrypt using an activity easily, here i am not able to do same 

     

    @Agnius  requesting you also too have a look on this as well 🙂

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It seems like UiPath applies some parameters behind the scenes that must be explicitly stated in PAD, such as the padding, the initialization vector, the key size, the encoding, etc. I've tried various combinations to de-crypt one of those passwords, as well as watching the YouTube video where they demonstrate this in UiPath to actually encrypt a sample password they actually provided in the video and see if I can get the same string, but I couldn't get it to work properly.

     

    It just seems like we're missing some data in the task that is needed for PAD to be able to handle this.

     

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @Agnius 

    You are right , I have tried this first in UiPath and it was easy to decrypt there,But when samething tried it is asking for some other parameters which i don't have the idea so i did a research with respect to this but could not find lead for this 😞

     

     

  • kinuasa Profile Picture
    797 Most Valuable Professional on at

    The following is a simple test code, I have confirmed that it can be decrypted.

    using System.Text;
    using System.Security.Cryptography;
    
    const int SALT_SIZE = 8;
    const int IV_SIZE = 12;
    const int TAG_SIZE = 16;
    const int KEY_SIZE = 32;
    
    var data = Convert.FromBase64String("RZwzrinqo6UbvDkZMeC6LWaqRSXmbKgaPtTD/9nluImgrYNflbK2wkW8biU=");
    var pass = Encoding.UTF8.GetBytes("botsDNA");
    
    var saltBytes = new byte[SALT_SIZE];
    var IV = new byte[IV_SIZE];
    var tag = new byte[TAG_SIZE];
    var encryptedData = new byte[data.Length - SALT_SIZE - IV_SIZE - TAG_SIZE];
    Array.Copy(data, 0, saltBytes, 0, SALT_SIZE);
    Array.Copy(data, SALT_SIZE, IV, 0, IV_SIZE);
    Array.Copy(data, SALT_SIZE + IV_SIZE, encryptedData, 0, encryptedData.Length);
    Array.Copy(data, SALT_SIZE + IV_SIZE + encryptedData.Length, tag, 0, TAG_SIZE);
    
    using var r = new Rfc2898DeriveBytes(pass, saltBytes, 10000);
    using var aes = new AesGcm(r.GetBytes(KEY_SIZE));
    var decryptedBytes = new byte[encryptedData.Length];
    aes.Decrypt(IV, encryptedData, tag, decryptedBytes);
    
    Console.WriteLine(Encoding.UTF8.GetString(decryptedBytes));

    When running with Power Automate for desktop, I guess the "Run .NET script" action or Custom actions could be used.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard