Commands & Syntax > Commands > Text & Variable Manipulation >

www.perfectkeyboard.com

 

ENCRYPT/DECRYPT - < data_crypt >() ... [Pro]

 

Variable ENCRYPT/DECRYPT
<data_crypt>("Input",Variable for result,"Password",ENCRYPT/DECRYPT)
Available in: Professional edition

This command encodes or decodes input text using provided password. The encoded/decoded text is put into variable. The variable can be used in other macro commands. If input text cannot be decoded due to a wrong password then empty string is saved in the variable.

 

#

Parameter name

Parameter description

1

Input

The input text to be encoded/decoded.

2

Variable for result

Name of the variable the encoded/decoded text is saved in.

3

Password

Password used to encode/decode the input text.

4

ENCRYPT/DECRYPT

ENCRYPT or DECRYPT

 

Example (Macro Steps):

 

1

<#> <#>This example shows how to use 'data_crypt' command

2

Macro execution: ONLY COMMANDS

3

Variable SET "vPwd1=", Message text="Enter password to encrypt text"

4

Variable ENCRYPT/DECRYPT Input = "Original input text to be encrypted", Variable for result = "vCT", Password = "%vPwd1%", ENCRYPT/DECRYPT = "ENCRYPT"

5

Message SHOW "Information" : "%vCT%" (other parameters: x = -100, y = -100, Window title = Encrypted text looks like this, Buttons = OK, Timeout (seconds) = 0, Always on top = No).

6

Variable SET "vPwd2=", Message text="Enter password to decrypt text"

7

Variable ENCRYPT/DECRYPT Input = "%vCT%", Variable for result = "vCT2", Password = "%vPwd2%", ENCRYPT/DECRYPT = "DECRYPT"

8

Message SHOW "Information" : "%vCT2%" (other parameters: x = -100, y = -100, Window title = If you provided correct decrypt password you see the original text, Buttons = OK, Timeout (seconds) = 0, Always on top = No).

Example (Plain Text):

 

<#>This example shows how to use 'data_crypt' command

<cmds>

<varset>("vPwd1=","Enter password to encrypt text")

<data_crypt>("Original input text to be encrypted",vCT,"%vPwd1%",ENCRYPT)

<msg>(-100,-100,"%vCT%","Encrypted text looks like this",1,0,0,0)

 

<varset>("vPwd2=","Enter password to decrypt text")

<data_crypt>("%vCT%",vCT2,"%vPwd2%",DECRYPT)

<msg>(-100,-100,"%vCT2%","If you provided correct decrypt password you see the original text",1,0,0,0)