DecryptText SQL FUNCTION
The DecryptText() function takes two (2) arguments and returns string from base 64. If any of the parameters are null or empty a null is returned. The first argument is the value which will be decrypted using AES 256
with second argument serving as the key. The key must match to original key to successfully decryt the string, the key is case sensitive.
If incorrect key is provided an error "Padding is invalid and cannot be removed." is generated.
Syntax DecryptText ( Encrypted String to Process , Secret Key)
/* Following code returns : Hello World */
SELECT DecryptText('ppsxZD8gsn03/LvyMz2rMg==', 'SecretKey');
It is very useful to store and retrive password protected information or other confidential information.