p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro PHP (http://p2p.wrox.com/forumdisplay.php?f=96)
-   -   Encryption (http://p2p.wrox.com/showthread.php?t=32514)

mani_he August 15th, 2005 10:52 PM

Encryption
 
Hi All
About encryption: I already know how to encrypt/decrypt php source code with mcrypt.dll (or .so on *unix), but the problem is i cannot encrypt the encription code.
e.x
index.php, products.php..... are encrypted/decrypted with encrypt.php
But the problem is how can i encrypt the encrypt.php
I did some googling and i found lost of program that will do it, but it cost a lot.
I wondering is it possible that I wrote the code? and I know I cannot do it with PHP.
Can anybody tell me what program lan. do I need and is my logic wrong/right (encrypt/ decrypt my source code with another code, and protect the encryption code(encrypt.php))?

Thanks
Regards
Mani_he



Moharo September 5th, 2005 07:39 AM

are you talking about decrypting? encrypting term refers to making a clear text into something not readable like so:

$clear = "whassup";
echo md5($clear); //encoding

you have to know that there's one-way encryption and two-way encryption, and one-way encryption can NOT be decrypted (like md5), the other onces - CAN...

check out http://pl.php.net/manual/en/ref.mcrypt.php for more about decrypting

www.campusgrind.com - college portal

robprell September 15th, 2005 07:29 PM

You pose an interesting question. Would it be possible to write an unencrypted php page that calls up an encrypted php page but unencrypts it then runs the code encrypted in it. Thus the first php page would not but encrypted but it contains no info but how to unencrypt the page that has the real code? I can't see how you can get apache/php to decrypt it before executing it other than this.


mani_he October 18th, 2005 02:20 PM

Hi Thanks for the answers.

Moharo => as I told before i know how encrypt and decrypt data with php using mcrypt lib.

I create class called crypt and I save that class in the file called
encryption.php
----------------
//contains class for encrypt data and decrypt data with key.


index.php
--------------
// call encryption.php class to encrypt the .php file.

the problem is how can i encrypt the encrption.php. If i encrypt that i cannot call it in index.php.
I just need a way to tell apache when the users type the web address, apache starts to de/encrypt.
As I did some research the only way i found is using C++ to create (.exe or .dll) file to tell apache to do it.

but do you guys have better way to do it

regards




All times are GMT -4. The time now is 09:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.