Showing results for 
Search instead for 
Did you mean: 

Function to encrypt hash(sha512, sha1, sha256, MD5)



Enable a function to be able to insert an encrypted password to SQL Server (or other server) and when consulting in the database option to decrypt in the same way.


Insert into SQL Server



Query in SQL Server from PowerApps




Jesús Aguirre

Status: New
Advocate III

Hi guys,


And thank you, both of you for your time, because your answers helped me a lot.

Now I have another problem with this "write code only" solution. This was working perfectly on 2 of the tenants, and on a third one, and of course the "most important" one 😁 the Hash step will run for 5 or 10 minutes instead of 0-1 second.

It will return the proper result but is taking too much time (they have 1 or 2 retries).

What could cause such a bad performance? Or for this kind of problem should I open a case to Microsoft Support?


Kind Regards,

Frequent Visitor

Hi @Lucian 

It's not entirely clear how this can work for so long. In theory, there is a limit of five seconds for a block of code.
Does your connector work quickly without a code, and with a code - five-ten minutes?
Or I misunderstood you. Explain more clearly and preferably attach a connector/block of executable code.

Advocate III

Hi @ValentinGasenko ,


The flow is pretty simple: put some text into a string variable, run the hash function and get the result.




I have used this setup just to be as closest as possible to the real flow that will use an "Apply to each" loop.


It seems that the Hash step had some retries:



The problem seems to be caused by the "5 second" limit:



Meanwhile, it seems like something was unlocked or "provisioned" because on the last test the flow was running very fast from 10 minutes, to 7 ms 😊:




I think it was just a "glitch in the matrix".


Thank you!


Kind Regards,


Frequent Visitor


Interesting case. If I were you, I would have sent it into the issue report for the MS.
And, of course, this functionality is still in the preview. Be careful.

Heavier, but safer to use the azure function.