ShinZan
asked on
Code Request Encrypt and Decrypt using XOR for PHP And VB6
I have been looking around for an algorithm that will encrypt a string and decrypt a string using a key.
This would require 4 functions that impliment the same algorithm in VB6 and PHP
php_DecryptValue(Cypher,Ke y)
php_DecryptValue(Cypher,Ke y)
vb6_EncryptValue(Cypher,Ke y)
vb6_DecryptValue(Cypher,Ke y)
I've seen some XOR for encrypt in both langs but I just need something quick painless and not overly powerful that i can just drag and drop. Can anyone help?
This would require 4 functions that impliment the same algorithm in VB6 and PHP
php_DecryptValue(Cypher,Ke
php_DecryptValue(Cypher,Ke
vb6_EncryptValue(Cypher,Ke
vb6_DecryptValue(Cypher,Ke
I've seen some XOR for encrypt in both langs but I just need something quick painless and not overly powerful that i can just drag and drop. Can anyone help?
I should add that if you want to encrypt and pass from VB to PHP and then decrypt then you need a common cypher. Blowfish is common to both but a list of PHP cyphers is at http://uk3.php.net/manual/en/mcrypt.ciphers.php
If you merely want to pass info securely over HTTP then maybe using HTTPS would be an option?
If you merely want to pass info securely over HTTP then maybe using HTTPS would be an option?
ASKER
I need a code sample as the above 4 procdure declarations
ASKER
I know I need a common cypher i am looking for straight cut and paste code of a common cyper in VB6 and php it can use XOR and be simple
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cut and paste code what else can you ask for
Your original question was not clear enough. I took it to mean that you needed a common set of encryption functions that work in both PHP and VB. I did not expect to write them from scratch.
Good luck with your project.
Good luck with your project.
ASKER
sorry but i even gave function delcarations and asked for copy paste code thats pretty clear i thought
Function declarations like those you gave are often presented to us here as function prototypes or examples of how the data should be passed or what the OP is looking to do. The links I gave to PHP's mcrypt mirrors your function definitions which is what I though you were looking for. For example,
mcrypt_generic($td, $input);
php_DecryptValue(Cypher,Ke y)
Also your original post does not contain either of the words copy or paste. Regardless of how you thought you had explained it, I am telling you how it read to me.
mcrypt_generic($td, $input);
php_DecryptValue(Cypher,Ke
Also your original post does not contain either of the words copy or paste. Regardless of how you thought you had explained it, I am telling you how it read to me.
http://www.php.net/mcrypt
http://uk3.php.net/manual/en/mcrypt.examples.php