gulp-protect
Protect applications by encrypting sourcecode with AES cipher using aes-js
Features
- Encrypt application code with 128, 192 or 256 bits key
- Adds decryption method
- Adds aes-js
- Adds authentication method
- Adds callback method
Installation
$ npm install gulp-protect --save
Description
This module encrypts your main application code with AES CTR.
// Your application { ;} // Encrypted 2122162248715815486111214163892212031311671791291123031031354978140231215166136158802402462182131321471004016322015
The encrypted cipher will be saved in a javascript file with an authentication method for retreiving a decryptionKey from an API, and a decryption method which will evaluate the decrypted code. After decryption a custom callback method will be called to bootstrap your application.
Usage
The example uses the module to protect an AngularJS application.
var gulp = ;var protect = ; // Provide 16, 24 or 32 bytes encryption keyvar encryptionKey = "Secret16BytesKey"; // Set optionsvar options = partials: auth: 'path/to/function.js' options: url: 'http://your.authentication.api' // String with callback method var callback = 'function () { angular.bootstrap(document, [\'yourApp\']); }') // Taskgulp;
Now you can run the task from the commandline
$ gulp protect