I need to secure data, sended in a "Site - Variable" targeting channel.
I'm using this code to hide data in request
$string = "var1=one;var2=somedata;var3=anotherdata;othervar=youknow;foo=bar;";
$encrypted = urlencode(base64_encode(mcrypt_ecb(MCRYPT_DES, ENCRYPTION_KEY, $string, MCRYPT_ENCRYPT)));
$decrypted = mcrypt_ecb(MCRYPT_DES, ENCRYPTION_KEY, base64_decode(urldecode($encrypted)), MCRYPT_DECRYPT);
printf("String: %s <br/> Salt: %s, <br/> Encrypted: %s <br/> Decrypted: %s",
$string, ENCRYPTION_KEY, $encrypted, $decrypted);
So, I want to get explode $encrypted on server, and get value by key (lik in Site - Variable).
When I'm trying to copy Site - Source method to edit it for my needs
cp plugins/deliveryLimitations/Site/Source.class.php plugins/deliveryLimitations/Site/Hidden.class.php
cp plugins/deliveryLimitations/Site/Source.delivery.php plugins/deliveryLimitations/Site/Hidden.delivery.php
"Targeting Channel" page return this:
I've tried to add files path to plugin/etc/Site/Site.xml and edited "$this->nameEnglish" in Hidden.class.php but it doesn't changed anything.
What am I doing wrong? Thanks