O'Reilly logo

LiveCode Mobile Development Cookbook by Dr. Edward Lavieri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required