PHP Classes

PHP Ghost Crypt: Encrypt PHP code and generate self decrypting code

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 64%Total: 1,002 This week: 1All time: 3,644 This week: 41Up
Version Licenses PHP version Categories
ghost 2.6Artistic License, G...5.3.3PHP 5, Cryptography, Code Generation
Description 

Author

This class can encrypt PHP code and generate self decrypting code.

It can take a given PHP script and encrypts its code with a given key.

The class generates an output script that contains the encrypted code in comment lines starting with #:# and code to decrypt and execute the encrypted code.

Innovation Award
PHP Programming Innovation award nominee
November 2015
Number 2
Sometimes it is necessary to obfuscate the code of PHP scripts to make it harder for non-expert users to understand what the code does or change it.

This class can obfuscate PHP scripts by encrypting the code and generating a script that when executed will decrypt the code and execute it like the original version of the script.

Manuel Lemos
Picture of Nick Daniels
  Performance   Level  
Name: Nick Daniels <contact>
Classes: 13 packages by
Country: United States United States
Age: 34
All time rank: 1107160 in United States United States
Week rank: 24 Up4 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Recommendations

Example

<?php

require_once 'GhostCrypt.class.php';

$gcrypt = new GhostCrypt("infile.php", ".enc.php", "PubKey");


  Files folder image Files (5)  
File Role Description
Accessible without login Plain text file example.php Example Example File
Plain text file GhostCrypt.class.php Class GhostCrypt Class File
Plain text file GhostHash.class.php Class GhostHash Class File
Accessible without login Plain text file infile.enc.php Output Example Infile encrypted
Accessible without login Plain text file infile.php Aux. Example Infile to encrypt

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Reuses Unique User Downloads Download Rankings  
 0%1
Total:1,002
This week:1
All time:3,644
This week:41Up
User Ratings User Comments (1)
 All time
Utility:92%StarStarStarStarStar
Consistency:89%StarStarStarStarStar
Documentation:-
Examples:89%StarStarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:716
 
awesome
8 years ago (Haseeb Ahmad Basil)
50%StarStarStar