show / hide menu

Encrypt

Purpose

The Encrypt function encrypts the specified input value using the provided salt and encryption version. For the same input value, salt, and encryption version, the function always produces the same encrypted output. This function is suitable for general-purpose data encryption where consistent encrypted values are required.

Syntax

Encrypt(Value, Salt, Version)

Arguments

1. Value – The value to be encrypted.

2. Salt – The key used along with the value to perform encryption.

3. Version – The encryption version to be used. The default value is 1.

Example

1. The below example returns the encrypted value as “balU3QsU8nydBkI9lnNHw/”

Encrypt(“hello”, “myKey”, 1)

2. The below example encrypts the value in TextBox1 using the provided salt and encryption version, and returns the encrypted value to TextBox2. 

TextBox2.Value=Encrypt(TextBox1.Value,”Salt”,1)