Wrox Programmer Forums
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 15th, 2005, 10:52 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default 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


 
Old September 5th, 2005, 07:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Moharo
Default

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
 
Old September 15th, 2005, 07:29 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old October 18th, 2005, 02:20 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 117
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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







Similar Threads
Thread Thread Starter Forum Replies Last Post
Encryption timeware SQL Server 2005 1 September 7th, 2006 12:35 PM
XSL Encryption RICHBIRD XSLT 1 June 14th, 2006 03:10 AM
FTP and encryption GeorgeW SQL Server DTS 0 June 9th, 2006 09:24 AM
Encryption question Warbird General .NET 2 May 31st, 2005 03:24 PM
with encryption jtrifts SQL Server 2000 1 February 21st, 2005 12:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.