stickcode 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,31 @@
1
+ # End User License Agreement (EULA) - StickCode
2
+
3
+ **Effective Date:** May 8, 2026
4
+ **Provider:** StickCode (Proprietary Software)
5
+
6
+ This End User License Agreement ("Agreement") is a legal agreement between you (the "Licensee") and StickCode ("Provider") for the use of the StickCode software engine and related keys.
7
+
8
+ ### 1. GRANT OF LICENSE
9
+ Subject to the terms of this Agreement, Provider grants Licensee a non-exclusive, non-transferable, and limited license to use the StickCode engine solely for internal business purposes, up to the maximum number of devices specified in the issued License Key.
10
+
11
+ ### 2. RESTRICTIONS
12
+ Licensee shall NOT:
13
+ * Reverse engineer, decompile, or disassemble the obfuscated engine code.
14
+ * Distribute, lease, or sub-license the software to third parties.
15
+ * Modify or circumvent the license verification mechanism (Digital Signatures).
16
+ * Use the software on more devices than permitted by the License Key.
17
+
18
+ ### 3. INTELLECTUAL PROPERTY
19
+ The software, including all obfuscated code, public keys, and logic, remains the sole property of StickCode. This license does not grant Licensee any ownership rights.
20
+
21
+ ### 4. LICENSE VERIFICATION
22
+ StickCode uses digital signatures for verification. Licensee acknowledges that the software may require a valid Public Key (`public.pem`) and a signed License JSON to function properly.
23
+
24
+ ### 5. TERMINATION
25
+ This license is effective until terminated. Provider reserves the right to terminate the license if Licensee fails to comply with any terms of this Agreement.
26
+
27
+ ### 6. NO WARRANTY
28
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL THE PROVIDER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
29
+
30
+ ---
31
+ *For support or custom licensing inquiries, please contact your StickCode representative.*
package/README.md ADDED
@@ -0,0 +1,158 @@
1
+
2
+ # StickCode Engine v3.1.4 🚀
3
+
4
+
5
+
6
+ **Enterprise-grade binary encryption and storage optimization for Node.js.**
7
+
8
+ StickCode is a high-performance security layer designed to protect intellectual property and sensitive corporate data. By combining **AES-256-GCM Authenticated Encryption** with **Brotli-11 Compression**, StickCode provides a "Shield-and-Shrink" solution that optimizes storage costs while enforcing military-grade security.
9
+
10
+ ## 📖 Extended Documentation
11
+
12
+ For advanced integration guides, server-side implementation, and database best practices:
13
+
14
+ 👉 [https://stickcode.freenbuy.com/docs](https://stickcode.freenbuy.com/docs)
15
+
16
+ ## 📦 Installation
17
+
18
+ ```bash
19
+ npm install stickcode
20
+ ```
21
+
22
+ ## 🛠 Quick Start
23
+
24
+ ```javascript
25
+ const StickCode = require('stickcode');
26
+ function run() {
27
+ try {
28
+
29
+ // 1. Initialize with your unique encrypted license payload
30
+ StickCode.init(process.env.STICKCODE_LICENSE);
31
+
32
+ // 2. Encrypt & Compress (Returns a raw binary Buffer)
33
+ const data = "Sensitive Corporate Intellectual Property";
34
+ const secureBuffer = StickCode.encrypt(data);
35
+
36
+ // 3. Decrypt & Decompress
37
+ const original = StickCode.decrypt(secureBuffer);
38
+ console.log("Status: Data Integrity Verified");
39
+ console.log("Output:", original);
40
+ } catch (err) {
41
+ console.error("Security Alert:", err.message);
42
+ }
43
+ }
44
+ run();
45
+ ```
46
+
47
+
48
+
49
+
50
+ ## 🛡️ Future-Proof Security: Dynamic Logic Rotation
51
+
52
+ ✨ **Key Features**
53
+
54
+ 🔒 **Authenticated Encryption (AEAD):** Uses AES-256-GCM to ensure data confidentiality and Integrity. Any attempt to tamper with the encrypted bytes will be detected instantly.
55
+
56
+
57
+
58
+ 📉 **Brotli-11 Compression:** Industry-leading data density, significantly reducing cloud storage costs and bandwidth usage.
59
+
60
+
61
+
62
+ 🛡️ **Proprietary Binary Layout:** Utilizing a moving-target defense, StickCode obfuscates the internal structure of encrypted payloads, making automated pattern recognition impossible.
63
+
64
+
65
+
66
+ 💻 **Cryptographic Machine-Binding:** Locks the software to specific hardware fingerprints using one-way SHA-256 hashing. No hardware data is ever stored in plain text.
67
+
68
+
69
+
70
+ 🔌 **100% Air-Gapped Validation:** No "phone home" or internet connection required for license validation. Everything happens locally for maximum privacy.
71
+
72
+
73
+
74
+ 🔄 **Future-Proof:** Adaptive Logic Rotation
75
+
76
+ To stay ahead of evolving threats, StickCode employs a versioned logic system:
77
+
78
+
79
+
80
+ Smart Metadata Headers: Every encrypted blob contains an internal version identifier.
81
+
82
+
83
+
84
+ Legacy Compatibility: The decrypt() method automatically identifies the version and applies the corresponding legacy logic.
85
+
86
+
87
+
88
+ Zero-Action Updates: Your existing data remains fully accessible even after upgrading to newer, more secure engine versions.
89
+
90
+
91
+
92
+ 💾 **Storage & Networking Best Practices**
93
+
94
+ StickCode outputs a raw binary Buffer. To maintain the integrity and efficiency of the data, follow these guidelines:
95
+
96
+ **1. File Storage**
97
+
98
+ Save the output directly as binary files (e.g., .sc or .bin). Never convert the output to a standard string (like UTF-8) as it will corrupt the binary structure.
99
+
100
+ ```javascript
101
+ const secureBuffer = StickCode.encrypt(data);
102
+ fs.writeFileSync('secure_storage.bin', secureBuffer);
103
+ ```
104
+
105
+ **2. Database Integration**
106
+
107
+ Always use Binary/Blob column types to prevent encoding errors and maintain maximum compression.
108
+
109
+ MongoDB: Use the Buffer type in Mongoose.
110
+ PostgreSQL/SQL: Use BYTEA or BLOB.
111
+
112
+
113
+ **3. API Transmission**
114
+
115
+ Send the Buffer directly as the request body.
116
+ Header: Content-Type: application/octet-stream
117
+
118
+ 📜 **Licensing Logic**
119
+
120
+ StickCode operates on a Seat-Based Lifetime Model:
121
+
122
+ **Hardware Signature:** On the first run, the engine generates a unique,
123
+ anonymous hardware signature.
124
+
125
+ **Local Registry:** This signature is stored in a secure local registry.
126
+
127
+ **Usage Limits:** Engine initialization is subject to the capacity and seat limits specified within your unique license key.
128
+
129
+
130
+ 🛠 API Reference
131
+
132
+ StickCode.init(licenseJson)
133
+ Validates the RSA signature of the license and initializes the cryptographic engine.
134
+ licenseJson: The signed JSON object provided upon purchase.
135
+ Returns: void
136
+ StickCode.encrypt(data, version = 0x02)
137
+ Compresses the input and wraps it in an encrypted authenticated envelope.
138
+ data: String or Buffer.
139
+ Returns: Buffer (The encrypted binary blob).
140
+ StickCode.decrypt(buffer)
141
+ Validates the integrity, decrypts, and decompresses the data.
142
+ buffer: The StickCode binary blob.
143
+ Returns: String (The original data).
144
+
145
+ ## ⚖️ License & Legal
146
+ Proprietary Software.
147
+
148
+ Copyright © 2026 StickCode by FreeNbuy. All rights reserved.
149
+
150
+ Unauthorized copying, modification, or distribution of this package is strictly prohibited.
151
+ Usage is governed by the LICENSE.md file included in this package.
152
+
153
+ 📞 Support & Enterprise Sales
154
+
155
+ Website: https://stickcode.freenbuy.com
156
+ Email: contact@freenbuy.com
157
+
158
+ ---
@@ -0,0 +1 @@
1
+ const a0_0x1ca77b=a0_0x4192;(function(_0x11d7c4,_0x41d4f9){const _0x439b06=a0_0x4192,_0x36240e=_0x11d7c4();while(!![]){try{const _0x5d5e16=-parseInt(_0x439b06(0x192))/0x1+parseInt(_0x439b06(0x161))/0x2+parseInt(_0x439b06(0x167))/0x3*(-parseInt(_0x439b06(0x15e))/0x4)+-parseInt(_0x439b06(0x189))/0x5+parseInt(_0x439b06(0x15b))/0x6*(-parseInt(_0x439b06(0x190))/0x7)+-parseInt(_0x439b06(0x17d))/0x8+parseInt(_0x439b06(0x16b))/0x9;if(_0x5d5e16===_0x41d4f9)break;else _0x36240e['push'](_0x36240e['shift']());}catch(_0x2d87c0){_0x36240e['push'](_0x36240e['shift']());}}}(a0_0x56cf,0xae68b));const crypto=require(a0_0x1ca77b(0x17e)),zlib=require(a0_0x1ca77b(0x16a)),fs=require('fs'),os=require('os'),path=require(a0_0x1ca77b(0x175)),_x1122x=a0_0x1ca77b(0x177),REG_FILE=path['join'](os[a0_0x1ca77b(0x17b)](),'.stickcode_license'),ALGO=a0_0x1ca77b(0x154);function getMachineId(){const _0x32797e=a0_0x1ca77b;return crypto[_0x32797e(0x17a)]('sha256')['update'](os['hostname']()+os['platform']()+os[_0x32797e(0x16f)]())[_0x32797e(0x18d)](_0x32797e(0x15c));}function verifyLicense(_0x49e0fd){const _0x1d6f42=a0_0x1ca77b;let _0x14abe4;if(typeof _0x49e0fd===_0x1d6f42(0x18c))try{_0x14abe4=JSON[_0x1d6f42(0x15f)](_0x49e0fd);}catch(_0x44a3fe){throw new Error('License\x20input\x20is\x20a\x20string\x20but\x20not\x20a\x20valid\x20JSON');}else _0x14abe4=_0x49e0fd;const {payload:_0x3bd262,signature:_0xa66167}=_0x14abe4;if(!_0x3bd262||!_0xa66167)throw new Error(_0x1d6f42(0x157));const _0x2f8c8f=crypto[_0x1d6f42(0x160)]('SHA256');_0x2f8c8f[_0x1d6f42(0x162)](_0x3bd262);if(!_0x2f8c8f[_0x1d6f42(0x170)](_x1122x,_0xa66167,_0x1d6f42(0x176)))throw new Error(_0x1d6f42(0x184));return JSON[_0x1d6f42(0x15f)](Buffer['from'](_0x3bd262,_0x1d6f42(0x176))[_0x1d6f42(0x187)]());}function loadRegistry(){const _0x1c8c82=a0_0x1ca77b;if(!fs['existsSync'](REG_FILE))return{'devices':[]};try{return JSON['parse'](fs[_0x1c8c82(0x181)](REG_FILE));}catch(_0x250bec){return{'devices':[]};}}function saveRegistry(_0x78f3bf){const _0x1a2c9c=a0_0x1ca77b;fs[_0x1a2c9c(0x188)](REG_FILE,JSON[_0x1a2c9c(0x164)](_0x78f3bf));}const StickCode={'VERSION':5.2,'key':null,'features':[],'init'(_0x388520){const _0x2124c9=a0_0x1ca77b,_0x59c6e8=verifyLicense(_0x388520),_0x27e845=getMachineId();let _0x33b77d=loadRegistry();if(!_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x153)](_0x27e845)){if(_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x155)]>=_0x59c6e8[_0x2124c9(0x18f)]){console[_0x2124c9(0x158)](_0x2124c9(0x186)),console['warn'](_0x2124c9(0x166)+_0x59c6e8[_0x2124c9(0x18f)]+_0x2124c9(0x171));throw new Error(_0x2124c9(0x163));}_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x174)](_0x27e845),saveRegistry(_0x33b77d);}(_0x33b77d['devices'][_0x2124c9(0x155)]>=0xa||_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x155)]===_0x59c6e8['maxDevices'])&&console['log'](_0x2124c9(0x18b)+_0x33b77d[_0x2124c9(0x179)][_0x2124c9(0x155)]+'/'+_0x59c6e8[_0x2124c9(0x18f)]),this[_0x2124c9(0x15d)]=_0x59c6e8[_0x2124c9(0x15d)]||[],this[_0x2124c9(0x156)]=crypto[_0x2124c9(0x17a)](_0x2124c9(0x159))[_0x2124c9(0x162)](_0x59c6e8['licenseId']+_0x2124c9(0x16c))[_0x2124c9(0x18d)]();},'_ensureInitialized'(){const _0x1aa8a1=a0_0x1ca77b;if(!this[_0x1aa8a1(0x156)])throw new Error(_0x1aa8a1(0x172));},'_mapToColors'(_0x1b1cf3){const _0x2d4ec3=a0_0x1ca77b,_0x50f1f0=zlib[_0x2d4ec3(0x183)](_0x1b1cf3,{'params':{[zlib['constants']['BROTLI_PARAM_QUALITY']]:0x6}}),_0x190c72=[];for(let _0x566907=0x0;_0x566907<_0x50f1f0[_0x2d4ec3(0x155)];_0x566907+=0x3){_0x190c72['push'](_0x50f1f0[_0x566907]||0x0),_0x190c72[_0x2d4ec3(0x174)](_0x50f1f0[_0x566907+0x1]||0x0),_0x190c72[_0x2d4ec3(0x174)](_0x50f1f0[_0x566907+0x2]||0x0);}return Buffer['from'](_0x190c72);},'_unmapFromColors'(_0x1aa75d){const _0x4274d3=a0_0x1ca77b;for(let _0x2fe9d6=_0x1aa75d[_0x4274d3(0x155)];_0x2fe9d6>0x0;_0x2fe9d6--){try{return zlib[_0x4274d3(0x169)](_0x1aa75d[_0x4274d3(0x180)](0x0,_0x2fe9d6));}catch(_0x50e5c0){}}throw new Error(_0x4274d3(0x168));},'encrypt'(_0x50d28c,_0x255025=0x2){const _0x10f27f=a0_0x1ca77b;this[_0x10f27f(0x185)]();const _0x3e660f=this[_0x10f27f(0x17c)](Buffer['from'](_0x50d28c)),_0x54c46c=crypto[_0x10f27f(0x17f)](0xc),_0x450c3b=crypto['createCipheriv'](ALGO,this[_0x10f27f(0x156)],_0x54c46c),_0x185b7c=Buffer[_0x10f27f(0x178)]([_0x450c3b[_0x10f27f(0x162)](_0x3e660f),_0x450c3b[_0x10f27f(0x15a)]()]),_0x24553c=_0x450c3b[_0x10f27f(0x173)](),_0x3bf601=crypto[_0x10f27f(0x17f)](_0x255025*0x2),_0x2d1758=crypto['randomBytes'](0x5);if(_0x255025===0x2)return Buffer[_0x10f27f(0x178)]([Buffer['from']([_0x255025]),_0x3bf601,_0x54c46c,_0x24553c,_0x185b7c]);else{if(_0x255025===0x3)return Buffer[_0x10f27f(0x178)]([Buffer['from']([_0x255025]),_0x54c46c,_0x2d1758,_0x185b7c,_0x24553c,_0x3bf601]);}throw new Error(_0x10f27f(0x18a)+_0x255025);},'decrypt'(_0x5aa7d3){const _0x3862af=a0_0x1ca77b;this['_ensureInitialized']();const _0x5d85c2=_0x5aa7d3[0x0];let _0x555519,_0x32808d,_0x21a705;switch(_0x5d85c2){case 0x2:{const _0x53c0be=_0x5d85c2*0x2,_0x2d451a=0x1+_0x53c0be;_0x555519=_0x5aa7d3[_0x3862af(0x180)](_0x2d451a,_0x2d451a+0xc),_0x32808d=_0x5aa7d3[_0x3862af(0x180)](_0x2d451a+0xc,_0x2d451a+0x1c),_0x21a705=_0x5aa7d3[_0x3862af(0x180)](_0x2d451a+0x1c);break;}case 0x3:{const _0x381406=_0x5d85c2*0x2,_0x49bb7f=0x1+0xc+0x5+0x10+_0x381406;if(_0x5aa7d3[_0x3862af(0x155)]<_0x49bb7f)throw new Error(_0x3862af(0x18e));_0x555519=_0x5aa7d3['slice'](0x1,0xd),_0x32808d=_0x5aa7d3[_0x3862af(0x180)](_0x5aa7d3[_0x3862af(0x155)]-0x10-_0x381406,_0x5aa7d3[_0x3862af(0x155)]-_0x381406),_0x21a705=_0x5aa7d3[_0x3862af(0x180)](0x12,_0x5aa7d3[_0x3862af(0x155)]-0x10-_0x381406);break;}default:throw new Error(_0x3862af(0x16d)+_0x5d85c2['toString'](0x10)['padStart'](0x2,'0'));}const _0x2a0dc3=crypto[_0x3862af(0x182)](ALGO,this[_0x3862af(0x156)],_0x555519);_0x2a0dc3[_0x3862af(0x191)](_0x32808d);const _0x1b2947=Buffer[_0x3862af(0x178)]([_0x2a0dc3[_0x3862af(0x162)](_0x21a705),_0x2a0dc3[_0x3862af(0x15a)]()]);return _0x5d85c2===0x2||_0x5d85c2===0x3?this[_0x3862af(0x165)](_0x1b2947)[_0x3862af(0x187)]():_0x1b2947[_0x3862af(0x187)]();},'resetDevices'(){saveRegistry({'devices':[]});}};module[a0_0x1ca77b(0x16e)]=StickCode;function a0_0x4192(_0x1ea63e,_0x2fe041){_0x1ea63e=_0x1ea63e-0x153;const _0x56cf25=a0_0x56cf();let _0x419211=_0x56cf25[_0x1ea63e];return _0x419211;}function a0_0x56cf(){const _0x15e666=['string','digest','Payload\x20too\x20short\x20for\x20V3\x20structure','maxDevices','259wwGfHj','setAuthTag','716864sELdty','includes','aes-256-gcm','length','key','Invalid\x20license\x20format:\x20missing\x20payload\x20or\x20signature','warn','sha256','final','11226aLqkQc','hex','features','5246932XPhrER','parse','createVerify','2284638pxKvKR','update','Device\x20limit\x20reached','stringify','_unmapFromColors','Current\x20license\x20allows\x20a\x20maximum\x20of\x20','3suEfrz','Failed\x20to\x20restore\x20data\x20from\x20color\x20map.','brotliDecompressSync','zlib','26876349ryATuz','STATIC_SALT_882','Unsupported\x20payload\x20version:\x200x','exports','arch','verify','\x20devices.','StickCode\x20Error:\x20Security\x20engine\x20not\x20initialized.\x20Please\x20call\x20.init(license)\x20first.','getAuthTag','push','path','base64','-----BEGIN\x20PUBLIC\x20KEY-----\x0aMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5bkpTd0NHw8SMK0HGAEj\x0ayJW9fK0/mBXTuyCDL4lkNMReu3tTGECZ5xuS96T5xKRk8ylHzVs+hlSEb4rjpDIS\x0avoYLC+fG3aB8YAz8NZ4jT3FXxa+gKo5IIwlEunt5ppi8PyQetUjtuqboxtKhlj8q\x0aME7D/Ro6BoSVvAdczDQj7JIdj390V3vT8K3/aPXJFl/j+AWwSMGAYLT1tlDwZR2V\x0aiaAfmbKa5PSFZ5Mg77YQ6jbKOplymmwUmFcpIzrY7U6DjRRwPwoBh+4wlDQ8Urid\x0a4kZB8IagfHj/ChRPgY/bBsBw+37krmhB0UUp4M1XezmyXvwKKF4ZK2XGDDrG0TkH\x0abQIDAQAB\x0a-----END\x20PUBLIC\x20KEY-----','concat','devices','createHash','homedir','_mapToColors','7858976NkFKTE','crypto','randomBytes','slice','readFileSync','createDecipheriv','brotliCompressSync','Invalid\x20license\x20signature','_ensureInitialized','\x0a[StickCode\x20Warning]\x20Device\x20limit\x20reached.','toString','writeFileSync','1670025cbzOek','Unsupported\x20encryption\x20version:\x20','[StickCode\x20Info]\x20Active\x20nodes:\x20'];a0_0x56cf=function(){return _0x15e666;};return a0_0x56cf();}
package/package.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "stickcode",
3
+ "version": "1.0.1",
4
+ "main": "engine/index.js",
5
+ "license": "Proprietary",
6
+ "files": [
7
+ "engine/",
8
+ "LICENSE.md"
9
+ ]
10
+ }