This project has two files:

oto_crypt.as – for flash oto_crypt.php – for php

Flash

To use oto_crypt.as file you must put in your project’s first frame the following line: #include “folder\oto_crypt.as” the “folder” is the folder where the file oto_crypt.as is saved.

to encrypt any string you must call oto_encrypt(“Your String” ) ;

to decrypt any encrypted string you must call oto_decrypt(“encrypted string” ) ;

PHP for test please visit http://www.oto.gr/crypt/encrypt_test.php

To use oto_crypt.php file you must put in your project’s first frame the following line: include ‘folder/oto_crypt.php’; the “folder” is the folder where the file oto_crypt.php is saved.

to encrypt any string you must call oto_encrypt(“Your String” ) ;

to decrypt any encrypted string you must call oto_decrypt(“encrypted string” ) ;

The aim that oto_crypt was created, was simple encryption to send encrypted string from flash to php end decrypt from php, because if you have flash shop, or you are sending some variables that you want no to be readable from other, you can just encrypt a string in flash and decrypt in php or backwards.

If you want that your encryption was unique and not decryptionable from others you can just change array values, in my example there are the following array:

in Flash:

var randomArr:Array = new Array(2, 5, 16, -1, 2, -3, 6, 20, 10, -4, 2, -2, 3, 1, -0, 1, 4, -4, 5, 2, 3, 1, 4);

in PHP :

$randomArr = array(2, 5, 16, -1, 2, -3, 6, 20, 10, -4, 2, -2, 3, 1, -0, 1, 4, -4, 5, 2, 3, 1, 4);

As you see the array elements from flash array and php array are same.
!!!! Attention: If you change one array another array must have the same elements.
Also your array can have unlimited elements.

PDF help and sample files are included

My Files:

\ \ \ \ \ \ \

by
by
by
by
by
by