{"id":15026413,"url":"https://github.com/illuusio/pecl-php-blenc","last_synced_at":"2025-10-03T23:32:33.543Z","repository":{"id":64519040,"uuid":"47813181","full_name":"illuusio/pecl-php-blenc","owner":"illuusio","description":"Protect PHP Scripts with Blowfish (PHP 7 and 8)","archived":false,"fork":true,"pushed_at":"2024-01-24T12:33:37.000Z","size":102,"stargazers_count":2,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-29T20:01:18.336Z","etag":null,"topics":["encryption","php7","php70","php71","php72","php73","php74","php8","php80","php81","php82","php83"],"latest_commit_sha":null,"homepage":"http://pecl.php.net/package/BLENC","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"php/pecl-php-blenc","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/illuusio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-11T08:00:11.000Z","updated_at":"2024-01-24T12:34:32.000Z","dependencies_parsed_at":"2023-02-09T10:45:50.600Z","dependency_job_id":null,"html_url":"https://github.com/illuusio/pecl-php-blenc","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illuusio%2Fpecl-php-blenc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illuusio%2Fpecl-php-blenc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illuusio%2Fpecl-php-blenc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illuusio%2Fpecl-php-blenc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illuusio","download_url":"https://codeload.github.com/illuusio/pecl-php-blenc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235204448,"owners_count":18952326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encryption","php7","php70","php71","php72","php73","php74","php8","php80","php81","php82","php83"],"created_at":"2024-09-24T20:04:26.267Z","updated_at":"2025-10-03T23:32:28.271Z","avatar_url":"https://github.com/illuusio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BLowfish ENCryption for PHP Scripts\n\nBLENC is an extension that permit to protect PHP source scripts with Blowfish Encription.\nBLENC hooks into the Zend Engine, allowing for transparent execution of PHP scripts previously\nencoded with BLENC.\n\nIt is not designed for complete security (it is still possible to disassemble the script\ninto op codes using a package such as XDebug), however it does keep people out of your code\nand make reverse engineering difficult.\n\nExtension have been tested with PHP versions 7.4 - 8.1.\n\n## Please notice\nAs [upstream project](htps://pecl.php.net/package/BLENC) seems to be stalled this should\nbe consired as fork of it. *Current code is compatible with original BLENC*.\n\n# How to use it?\nUsing Blenc it not very well documented and you can mess up your code and you\ncan't get it back. **So please test with test scripts and then apply to your big commercial project!**\nand remember to backup code before encoding.\n\n## TL;DR\n**As said above. If you encode and forget your decode key your code is not easily\ndecoded. As every encoding BLENC also breaks so this is not 100% safe and Using\nBLENC only makes getting code exploration slower and hides code from amateurs!\n(it is still possible to disassemble the script into op codes using a package such as XDebug)**\n\nFirst compile as php extension. Install shared object (Windows .DLL and Unix systems .SO) to\nyour php-extension directory. After that enable extension and encode your files.\nAdd decoding keys and start using.\n\n### This is example for compiling (You need to have PHP development files)\n\n```# phpize\n # ./configure\n # make\n # cp .libs/blenc.so to /some/where/php7/extensions/\n```\n\n## Update INI file\nFind where your PHP INI files are and add to blenc.ini file:\n```; comment out next line to disable blenc extension in php\nextension=blenc.so\n\n; The location where BLENC can find the file containing a list of\n; available decryption keys. This file must be readable by web-server.\n;\nblenc.key_file = \"/location/to/conf.d/blenc.keys\"\n```\n\n## Encode your file\nTo encode your file you can run blencode.php or make you own better script\n```blencode.php script.php``` which should output this kind of output\n\n```\nBLENC  blenc_protect starts...\nBLENC  blowfish unencrypted key: 61078a970fdab66038c8cc8f12548d73\nBLENC  file to encode: script.php\nBLENC  backup file : backup/script.php.2018_05_31_10_05_53\nBLENC  size of content: 24\nBLENC  MD5: 0358c26c0bb6f612d8dc7b004bf68143\nBLENC  redistributable key: miWqx+zKq0rnRa2wt4jk8v5ckGBRxhS3in041fUJkWU=\nBLENC  redistributable key file key_file.blenc updated.\nBLENC  done.\n```\n\nYour old unencoded file in at backup-directory and encoded file is renamed script.phpenc (which is symlinked to script.php).\nYour encode key it at **blenc.key** which is not encoded and if someone can\nget that he or she can decode your scripts at ease! Encoded key is on **key_file.blenc**\nwhich you need to copy **/location/to/conf.d/blenc.keys**.\nIf you like use some other encryption key of your like then add it before encoding\nto blenc.key.\n\n## Running your scripts\nIf you have added keys to correct place you should be able to run it as before.\n**There is no promise made that everything works as expected!**\n\n## Extra things to do\nFor extra safety main encoding key should be changed in **blenc_protect.h** (It's named BLENC_PROTECT_MAIN_KEY). default is '0123456789abcdef0123456789abcdef'. In **blenc_protect.h** you can also make module expire.\n\n# Code formating\nCurrent formating is mainly [One True Brace Style (1TBS)](https://astyle.sourceforge.net/astyle.html#_style=1tbs) with some changes:\n```\nastyle --indent=spaces=4 --style=1tbs --max-code-length=120 --lineend=linux --align-pointer=name --align-reference=name --add-braces --formatted --convert-tabs --break-after-logical --pad-oper --break-blocks=all --indent-col1-comments *.c *.h\n```\nIt's tested with CI when doing Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filluusio%2Fpecl-php-blenc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filluusio%2Fpecl-php-blenc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filluusio%2Fpecl-php-blenc/lists"}