Book Image

LiveCode Mobile Development Cookbook

By : Dr. Edward Lavieri
Book Image

LiveCode Mobile Development Cookbook

By: Dr. Edward Lavieri

Overview of this book

Table of Contents (17 chapters)
LiveCode Mobile Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Create a new main stack in LiveCode.

  2. Set the background color of the stack's card to black.

  3. Add a label with the following properties:

    • Name: fldPlain

    • Width: 175

    • foregroundColor: Yellow

    • contents: Plain Text

  4. Add a second label with the following properties:

    • Name: fldEncrypted

    • Width: 175

    • foregroundColor: Yellow

    • Contents: Encrypted Text

  5. 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

  6. Add a second scrolling text field with the following properties...