Home > Language Reference > String Management Functions > Encrypt

Encrypt

The Encrypt function encrypts the specified string.

Usage

Used to encrypt passwords in a script.

Syntax

ret=Encrypt(<source_string>, <encrypted_string>)

Parameters

<source_string>, string, text to be encrypted.
 
<encrypted_string>, string, encrypted text. This second parameter must be a string variable. 

Return value

Ret, optional numeric return code. If the function succeeds, the return value is 0. If it fails, the return value is 1.

See also

Asc
Chr$
ExtractBetween$
InStr
InStrRev
LCase$
Left$
Len
LTrim$
Mid$
Replace$
Right$
RTrim$
SplitIntoArray
Str$
Trim$
UCase$
Val

Example

a$=InputBoxSecret$("Enter your password:")
Encrypt(a$,encr$)
msgbox("Your encrypted password is: "+encr$)