Getting Started
CodeLockr provides enterprise-grade code encryption for PHP, JavaScript, TypeScript, and Next.js. Follow these four steps to get started:
Encrypt Your Files
Upload a source file and choose a protection level.
Install a Loader
Install the official CodeLockr runtime via Composer or npm.
Deploy
Replace your source files with encrypted versions. Deploy as normal.
Loader Installation
PHP Loader (Composer)
Install the official PHP runtime via Composer:
composer require codelockr/runtime
Usage in PHP (no manual require needed if you use CodeLockr’s wrappers):
<?php // Auto-loaded by codelockr/runtime include 'encrypted-file.clr.php';
Uncaught Error: CodeLockr\Runtime\clr_exec not found
Node.js & Next.js Loader (NPM)
Install the official Node.js runtime via npm:
npm install @codelockr/runtime
The loader is automatically loaded by .clr.js wrappers. No manual require needed.
// Auto-loaded by @codelockr/runtime
const myModule = require('./encrypted-file.clr.js');Error: CODELOCKR: Runtime not installed. Run: npm install @codelockr/runtime
REST API
Error Messages
Runtime Errors
| Error | Platform | Cause | Solution |
|---|---|---|---|
CodeLockr\Runtime\clr_exec not found |
PHP | Composer package not installed or not auto-loaded | composer require codelockr/runtime |
CODELOCKR: Runtime not installed. Run: npm install @codelockr/runtime |
Node.js | NPM package not installed | npm install @codelockr/runtime |
Protection Levels
| Level | Encryption | Obfuscation | Overhead | Use Case |
|---|---|---|---|---|
| Weak | - | Basic | ~1% | Internal tools |
| Medium | AES-128 | Advanced | ~3% | Most apps |
| Max | AES-256-GCM | Maximum | ~5% | Production |
| Full Soon | AES-256 + HW bind | Ultimate | ~8% | High-value IP |
FAQ
How do I update the loader?
composer update codelockr/runtime for PHP,
npm update @codelockr/runtime for Node.js.
Can I decrypt my files?
No. Always backup original source files. Encrypted files execute only via loader.
What if loader is missing?
Files refuse to execute with clear error messages. The loader must be installed and auto-loaded.
Does it slow down code?
No. One-time memory decryption. Runtime performance equals the original script.
Support?
Email us at hello@codeforgex.studio