Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

stencyption

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stencyption

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.

latest
npmnpm
Version
3.1.0
Version published
Weekly downloads
166
-21.7%
Maintainers
1
Weekly downloads
 
Created
Source

Stencyption - JavaScript Code Encryption

Advanced JavaScript code encryption tool that protects your source code while keeping it executable.

Installation

npm link

After linking, you can use the stencyption command globally.

Quick Start

1. Encrypt a file

stencyption encrypt myfile.js

This creates myfile.encrypted.js

2. Run encrypted file

node myfile.encrypted.js

Usage Examples

# Encrypt with custom output name
stencyption encrypt app.js -o protected.js

# Encrypt files with relative imports
stencyption encrypt bot/login/login.js -o bot/login/login.encrypted.js

# Encrypt complex projects
stencyption encrypt src/index.js -o dist/index.encrypted.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:

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

v1.0.10 (Latest)

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

v1.0.5

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

# Show help
stencyption help

# Encrypt a file
stencyption encrypt <input-file> [-o <output-file>]

Requirements

  • Node.js 14 or higher
  • stencyption package linked (or installed) to run encrypted files

Version

1.0.10 - Latest version with global context preservation fix

License

ISC

Keywords

encryption

FAQs

Package last updated on 08 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts