Military-grade JavaScript encryption with AES-256-GCM, polymorphic obfuscation, and anti-debugging protection. Each file gets unique encryption keys embedded in heavily obfuscated code.
npm install stencyptionAdvanced JavaScript code encryption tool that protects your source code while keeping it executable.
``bash`
npm link
After linking, you can use the stencyption command globally.
`bash`
stencyption encrypt myfile.js
This creates myfile.encrypted.js
`bash`
node myfile.encrypted.js
`bashEncrypt with custom output name
stencyption encrypt app.js -o protected.js
Features
✅ Global context preservation - Works with files that use global variables (NEW in v1.0.10!)
✅ Complete file encryption - Encrypts entire source code as-is
✅ Relative imports - Works with
require("./local/module")
✅ npm packages - Works with axios, crypto, cheerio, lodash, etc.
✅ AES-256 encryption - Military-grade encryption
✅ 5-layer obfuscation - Advanced code protection
✅ Zero performance overhead - Fast execution Programmatic Usage
Use the provided
encrypt.js script or create your own:`javascript
const fs = require('fs');
const { Encryptor } = require('./src/index.js');// Read your source code
const sourceCode = fs.readFileSync('myfile.js', 'utf8');
// Encrypt it
const encrypted = Encryptor.encrypt(sourceCode);
// Save encrypted version
fs.writeFileSync('myfile.encrypted.js', encrypted, 'utf8');
console.log('✅ Encryption complete!');
`What Gets Encrypted
The tool encrypts your entire JavaScript file including:
- All imports and requires (both relative and npm packages)
- All variables, functions, and classes
- All code logic and algorithms
- Comments and code structure
Nothing becomes undefined - everything is preserved exactly as you wrote it.
Fixed Issues
$3
✅ Global context preservation - Files using global.utils, global.GoatBot, etc. now work correctly
✅ Large file encryption - login.js and utils.js type files encrypt without errors $3
✅ Relative imports now work - require("./logger/log.js") works perfectly
✅ No more undefined errors - Properties like .hex, .toString() work correctly
✅ Complete file encryption - No missing imports or variables
✅ Proper path resolution - Encrypted files execute from correct directory CLI Commands
`bash
Show help
stencyption helpEncrypt a file
stencyption encrypt [-o ]
``- Node.js 14 or higher
- stencyption package linked (or installed) to run encrypted files
1.0.10 - Latest version with global context preservation fix
ISC