Encrypting text
LiveCode includes several cyphers that allow us to encrypt and decrypt data. In this recipe, you will select a cipher, assign a password, and encrypt data. You will also decrypt that data using the same cypher and password.
How to do it...
Follow this recipe's steps to encrypt and decrypt text:
Create a new main stack in LiveCode.
Set the background color of the stack's card to black.
Add a label with the following properties:
Name:
fldPlain
Width:
175
foregroundColor: Yellow
contents:
Plain Text
Add a second label with the following properties:
Name:
fldEncrypted
Width:
175
foregroundColor: Yellow
Contents:
Encrypted Text
Add a scrolling text field with the following properties:
Name:
plainText
traversalOn (Focusable): Keep it unchecked
showFocusBorder (Focus border): Keep it unchecked
borderWidth:
0
foregroundColor: Black
backgroundColor: White
Contents:
The lazy dog jumped over the quick brown fox.
Size of text:
18
Add a second scrolling text field with the following properties...