less than 1 minute to read

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

Syntax

vbnet
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

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

VBScript

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

JavaScript

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

C#

csharp
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