Permalink
Browse files

0.2.3 release

  • Loading branch information...
1 parent 60ed3ac commit c786047fb118da3c74d24d236cc95c9f6cc0456f @chriso chriso committed Dec 21, 2010
View
0 LICENSE 100644 → 100755
No changes.
View
@@ -18,30 +18,29 @@ To encrypt `myscript.js` using the password `pass123`, run
Encrypted modules can be accessed by calling
- require(packed).unpack(password);
+ require(packed_file).unpack(password);
## Example
The following example was packed using
$ packnode pass123 < hello1.js > hello2.js
-hello1.js
+*hello1.js*
exports.world = function () {
console.log('Hello world!');
};
-hello2.js
+*hello2.js*
- e="5b3be6d94448754b6d8484a78b5f30d7a2c2598105d0e225166a0132bef8b1cba74422cb32a08289d092e331652e403f4c32"
- +"39716c3fd1d4605156d9ebb8781e";
- exports.unpack=function(p){var d=require("crypto").createDecipher("aes256",p);
- eval(d.update(e,"hex","utf8")+d.final("utf8"));return exports;}
+ e="5b3be6d94448754b6d8484a78b5f30d7a2c2598105d0e225166a0132bef8b1cba74422cb32a08289d092e331652e403f4c3239716c3fd1d4605156d9ebb8781e";
+ exports.unpack=function(p){var d=require("crypto").createDecipher("aes256",p);eval(d.update(e,"hex","utf8")+d.final("utf8"));return exports}
Both are equivalent
require('./hello1').world(); //Outputs 'Hello world!'
+
require('./hello2').unpack('pass123').world(); //Outputs 'Hello world!'
## Advanced
View
0 index.js 100644 → 100755
No changes.
View
0 lib/index.js 100644 → 100755
No changes.
View
@@ -8,7 +8,7 @@ var stdin = process.openStdin(), input = '';
var cipher, data = '', encrypted, out,
packed, decipher, password, unpack,
encoding = 'hex', algorithm = 'aes256',
- chunk_length = 120, chunk = [];
+ chunk_length = 128, chunk = [];
var exit = function (msg, is_error) {
console.log(msg);
View
0 lib/yuicompressor-2.4.2.jar 100644 → 100755
No changes.
View
@@ -1,6 +1,6 @@
{ "name" : "pack",
"description" : "Minify, obfuscate and encrypt node modules",
- "version" : "0.2.2",
+ "version" : "0.2.3",
"homepage" : "http://github.com/chriso/packnode",
"keywords" : ["pack","packnode","encrypt","compress","unpack","yui","obfuscate","compressor","closure","jsmin"],
"author" : "Chris O'Hara <cohara87@gmail.com>",

0 comments on commit c786047

Please sign in to comment.