| Stonefield Query SDK |
| Decrypt |
Syntax
Decrypt(Text as String, Key as String) as String
Parameters
Text
The encrypted text to decrypt.
Key
The key that was used to encrypt the string.
Return Value
The decrypted string.
Example
Suppose your application needs a password to access a resource. You don't want to store the password in clear text, so you use the code in the Setup.Settings event to store it as an encrypted value in the Registry. Later, you need to decrypt the encrypted value so you can use it to access the resource. (Note: the code shown in these examples would be part of a larger script.)
Visual FoxPro
lcPassword = SQApplication.GetRegistryValue('dbpassword', '')
lcPassword = SQApplication.Decrypt(lcPassword, 'whatever')
* do something with the password here VBScript
Password = Application.GetRegistryValue("dbpassword", "")
Password = SQApplication.Decrypt(Password, "whatever")
' do something with the password here JavaScript
Password = Application.GetRegistryValue('dbpassword', '') ;
Password = SQApplication.Decrypt(Password, 'whatever') ;
' do something with the password hereSee Also
Application Object | Encrypt | Setup.Settings
| Last Updated: 02/05/2008 |