The Encrypt method encrypts a string, usually so you can avoid storing it in clear text.

Syntax

Encrypt(Text as String, Key as String) as String

Parameters
Text
The text to encrypt.

Key
The key used to encrypt the string.

Return Value
The encrypted string.

Example
These simple examples encrypt a string.

The code shown in these examples would be part of a larger script.

Visual FoxPro

lcEncrypted = SQApplication.Encrypt(lcPassword, 'whatever')

VBScript

Encrypted = Application.Encrypt(Password, "whatever")

JavaScript

Encrypted = Application.Encrypt(Password, 'whatever') ;

C#

Encrypted = SQApplication.Encrypt(Password, "whatever");

VB.NET

Encrypted = SQApplication.Encrypt(Password, "whatever")

See also

Application Object | Decrypt

© Stonefield Software Inc., 2024 • Updated: 06/06/16
Comment or report problem with topic