Example of encrypt and decrypt

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
titobal
Posts: 31
Joined: Thu Aug 06, 2009 1:51 pm

Example of encrypt and decrypt

Post by titobal » Mon Aug 31, 2009 1:47 pm

Hi,

Anybody can show how to use encrypt and decrypt commands

for encrypting / decrypting a text (not a file, a text, a label ...)

Many thanks.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Sep 01, 2009 8:49 am

Dear titobal,

Code: Select all

get "bla"
encrypt it using "blowfish" with "1234567"
put it
Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

titobal
Posts: 31
Joined: Thu Aug 06, 2009 1:51 pm

Hi Mark, thanks for the hekp... however I have a question...

Post by titobal » Tue Sep 01, 2009 3:02 pm

During the encryption / decryption process can we in revolution use a key file instead of a simple password ? and a keyfile + a password ?

I would like to use the key file + password as the executable generate gets disassembled the password can be accessible, but the keyfile can be put in a distant network location for example...

Any idea on how to implement that encryption scheme ... ?

Thanks for your answer.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Sep 01, 2009 3:24 pm

Dear titobal,

You can use anything you like as an encryption key.

Code: Select all

put url "http://www.domain.com/key.txt" into myKey
encrypt it using "blowfish" with myKey

Code: Select all

put url "binfile:~/folder/key.txt" into myKey
encrypt it using "blowfish" with myKey
etc.

Have you read the documentation about the encrypt and decrypt commands and the cyphers function?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply