Purpose
The DecryptFromSecurity function decrypts data that was encrypted using the EncryptFromSecurity function. It performs double decryption through the Security Service to retrieve the original plain text. The function can successfully decrypt encrypted values generated from the same plain text and salt, even though EncryptFromSecurity produces different encrypted outputs for each encryption.
Syntax
DecryptFromSecurity(Value, Salt)

Example
1. The below examples returns the decrypted value as Password123
DecryptFromSecurity(“4HalA/Bm5FyC9cOw++lQprnpQ4ljMaa2ePnhLloDPPTb+xMtIQilifWc7W2JFTZX”,”MySalt”)
DecryptFromSecurity(“BqJrkxnP0LHUEoMOfDOiZQWIAqhGMa7UEN2dgAqbt+81HbWsFj/lkbd/XLqeA0LL”,”MySalt”)

2. The below example decrypts the value in TextBox2 using the provided salt and returns the decrypted value to TextBox1.
TextBox1.Value=DecryptFromSecurity(TextBox2.Value,Salt)