{"_id":"@azemzemi/cryptobox","_rev":"3-96204fd4399bad739d31e7c87f0323e1","name":"@azemzemi/cryptobox","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@azemzemi/cryptobox","version":"1.0.0","keywords":["encryption","storage","security","web-crypto","aes-gcm","aes-256","pbkdf2","crypto","secure-storage","token","vault","cryptography","typescript","browser","nodejs","deno","bun"],"author":{"url":"https://github.com/zemzemi","name":"Adel Zemzemi"},"license":"MIT","_id":"@azemzemi/cryptobox@1.0.0","maintainers":[{"name":"azemzemi","email":"adelzemzemi@hotmail.com"}],"homepage":"https://github.com/zemzemi/cryptobox#readme","bugs":{"url":"https://github.com/zemzemi/cryptobox/issues"},"dist":{"shasum":"a847a385a5e8f79c55a0585b0fc753382c7d2245","tarball":"https://registry.npmjs.org/@azemzemi/cryptobox/-/cryptobox-1.0.0.tgz","fileCount":89,"integrity":"sha512-8xvjAlKjSVPzHmo3H+azcoS5rva7Qfecza05uf+VMQfQG8u/86pxMfXYHUzMJX5rK4KtgVpb7F3Esx5kPg6OKQ==","signatures":[{"sig":"MEQCIEoveEUrGw00YP3jHjnuH/sc8B0ysO6qd+cu5eb3KU9NAiBRNt/prGRrH2jjns+GofoWa3cCXQZkioAjug0SsvpWAw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65624},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"f9b3c77c53a622f8f3a1d25cc864012fea351942","scripts":{"lint":"eslint src --ext .ts","test":"vitest run","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"examples/**/*.ts\"","prepare":"npm run build","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","type-check":"tsc --noEmit","build:watch":"tsc --watch","format:check":"prettier --check \"src/**/*.ts\" \"examples/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"azemzemi","email":"adelzemzemi@hotmail.com"},"repository":{"url":"git+https://github.com/zemzemi/cryptobox.git","type":"git"},"_npmVersion":"10.9.2","description":"Zero-dependency encryption library for JavaScript & TypeScript. Secure localStorage, sessionStorage, or any data with AES-256-GCM encryption. Production-ready with 93% test coverage.","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","eslint":"^9.15.0","vitest":"^4.0.14","prettier":"^3.3.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.15.0","@vitest/coverage-v8":"^4.0.14","eslint-config-prettier":"^9.1.0"},"_npmOperationalInternal":{"tmp":"tmp/cryptobox_1.0.0_1764368402782_0.06739558409887114","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@azemzemi/cryptobox","version":"1.0.1","keywords":["encryption","storage","security","web-crypto","aes-gcm","aes-256","pbkdf2","crypto","secure-storage","token","vault","cryptography","typescript","browser","nodejs","deno","bun"],"author":{"url":"https://github.com/zemzemi","name":"Adel Zemzemi"},"license":"MIT","_id":"@azemzemi/cryptobox@1.0.1","maintainers":[{"name":"azemzemi","email":"adelzemzemi@hotmail.com"}],"homepage":"https://github.com/zemzemi/cryptobox#readme","bugs":{"url":"https://github.com/zemzemi/cryptobox/issues"},"dist":{"shasum":"dcf25a86f8c39599024639f689d004e7277e1189","tarball":"https://registry.npmjs.org/@azemzemi/cryptobox/-/cryptobox-1.0.1.tgz","fileCount":39,"integrity":"sha512-Xh+gjU1RRNfhkMDFol+rpgnCN6o1dhf5Rhof/O4AocoledFZCM+bh7M3RRXoNi90QKPlMda2KNHwQgsEFNxozw==","signatures":[{"sig":"MEYCIQDPrLNxuiTAY9i4JTbmSa5z2CHDTt3Uw9ojh6xXLXVibAIhAKnFol8b4dvNjls6ZWDawHYdi92IYxhvn7lhscvc0VVc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135759},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"aba940bf772069af77d1339eaff2e9b6ff5c2afa","scripts":{"lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts\" \"examples/**/*.ts\"","prepare":"npm run build","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","type-check":"tsc --noEmit","build:watch":"tsup --watch","format:check":"prettier --check \"src/**/*.ts\" \"examples/**/*.ts\"","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"azemzemi","email":"adelzemzemi@hotmail.com"},"repository":{"url":"git+https://github.com/zemzemi/cryptobox.git","type":"git"},"_npmVersion":"10.9.2","description":"Zero-dependency encryption library for JavaScript & TypeScript. Secure localStorage, sessionStorage, or any data with AES-256-GCM encryption. Production-ready with 93% test coverage.","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","tsup":"^8.5.1","eslint":"^9.15.0","vitest":"^4.0.14","prettier":"^3.3.0","typescript":"^5.7.0","@types/node":"^22.10.0","typescript-eslint":"^8.15.0","@vitest/coverage-v8":"^4.0.14","eslint-config-prettier":"^9.1.0"},"_npmOperationalInternal":{"tmp":"tmp/cryptobox_1.0.1_1764794867057_0.8965763945288212","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@azemzemi/cryptobox","version":"1.0.2","type":"module","description":"Zero-dependency encryption library for JavaScript & TypeScript. Secure localStorage, sessionStorage, or any data with AES-256-GCM encryption. Production-ready with 93% test coverage.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","build:watch":"tsup --watch","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","type-check":"tsc --noEmit","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","format":"prettier --write \"src/**/*.ts\" \"examples/**/*.ts\"","format:check":"prettier --check \"src/**/*.ts\" \"examples/**/*.ts\"","prepublishOnly":"npm run build && npm test","prepare":"npm run build"},"keywords":["encryption","storage","security","web-crypto","aes-gcm","aes-256","pbkdf2","crypto","secure-storage","token","vault","cryptography","typescript","browser","nodejs","deno","bun"],"author":{"name":"Adel Zemzemi","url":"https://github.com/adelzemzemi"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adelzemzemi/cryptobox.git"},"bugs":{"url":"https://github.com/adelzemzemi/cryptobox/issues"},"homepage":"https://github.com/adelzemzemi/cryptobox#readme","engines":{"node":">=18.0.0"},"devDependencies":{"@types/node":"^22.10.0","@vitest/coverage-v8":"^4.0.14","eslint":"^9.15.0","eslint-config-prettier":"^9.1.0","prettier":"^3.3.0","tsup":"^8.5.1","tsx":"^4.20.6","typescript":"^5.7.0","typescript-eslint":"^8.15.0","vitest":"^4.0.14"},"_id":"@azemzemi/cryptobox@1.0.2","gitHead":"380ed704fc936799fc98fb745bc1b905f31b03c8","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-4MobpxqVKhZ8v6yF18y+wZwbKV72z+jwwzzeSh79Xe9vIbhMq64DVJZGa3xn2K0Uj29/KRv6xEUnYZHa3l3gLw==","shasum":"827709ebe9ca6efbfd922d3481621611f70a6c63","tarball":"https://registry.npmjs.org/@azemzemi/cryptobox/-/cryptobox-1.0.2.tgz","fileCount":39,"unpackedSize":135954,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJCmPAC4j3DBDj/eqSSyr/fyc1YmWkN/tS+dlQVks8zAIhANXqyBcGTc5UmCStpVGxAAVPKa9krWFzuzBPowF5SCL6"}]},"_npmUser":{"name":"azemzemi","email":"adelzemzemi@hotmail.com"},"directories":{},"maintainers":[{"name":"azemzemi","email":"adelzemzemi@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cryptobox_1.0.2_1778845243352_0.029653172126357985"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-28T22:20:02.699Z","modified":"2026-05-15T11:40:43.598Z","1.0.0":"2025-11-28T22:20:03.016Z","1.0.1":"2025-12-03T20:47:47.273Z","1.0.2":"2026-05-15T11:40:43.504Z"},"bugs":{"url":"https://github.com/adelzemzemi/cryptobox/issues"},"author":{"name":"Adel Zemzemi","url":"https://github.com/adelzemzemi"},"license":"MIT","homepage":"https://github.com/adelzemzemi/cryptobox#readme","keywords":["encryption","storage","security","web-crypto","aes-gcm","aes-256","pbkdf2","crypto","secure-storage","token","vault","cryptography","typescript","browser","nodejs","deno","bun"],"repository":{"type":"git","url":"git+https://github.com/adelzemzemi/cryptobox.git"},"description":"Zero-dependency encryption library for JavaScript & TypeScript. Secure localStorage, sessionStorage, or any data with AES-256-GCM encryption. Production-ready with 93% test coverage.","maintainers":[{"name":"azemzemi","email":"adelzemzemi@hotmail.com"}],"readme":"# CryptoBox\n\nSecure encryption and storage for JavaScript & TypeScript.\n\n[![npm version](https://img.shields.io/npm/v/@azemzemi/cryptobox.svg)](https://www.npmjs.com/package/@azemzemi/cryptobox)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)\n[![GitHub](https://img.shields.io/badge/GitHub-zemzemi%2Fcryptobox-blue.svg)](https://github.com/adelzemzemi/cryptobox)\n\nZero dependencies • AES-256-GCM • Type-safe • Cross-platform\n\n## Why CryptoBox?\n\n- **🔒 Secure by Default** - Military-grade AES-256-GCM encryption\n- **📦 Zero Dependencies** - No supply chain vulnerabilities\n- **🎯 Type-Safe** - Full TypeScript support with strict typing\n- **✅ Production-Ready** - 93% test coverage, battle-tested\n- **⚡ Simple API** - 3 lines to encrypt localStorage\n- **🌐 Universal** - Works in Browser, Node.js, Deno, and Bun\n\n## Install\n\n```bash\nnpm install @azemzemi/cryptobox\n```\n\n## Usage\n\n```typescript\nimport { createSecureLocalStorage } from '@azemzemi/cryptobox';\n\nconst storage = createSecureLocalStorage();\n\nawait storage.setSecure('user', { id: 123 }, 'password');\nconst user = await storage.getSecure('user', 'password');\n```\n\n## Features\n\n- AES-256-GCM encryption with PBKDF2\n- Zero dependencies\n- Full TypeScript support\n- Browser, Node.js 18+, Deno, Bun\n- 93% test coverage\n\n## Use Cases\n\n```typescript\n// Authentication tokens\nawait storage.setSecure('auth', { jwt: 'xxx', refresh: 'yyy' }, password);\n\n// Sensitive user data\nawait storage.setSecure('payment', { cardLast4: '1234' }, password);\n\n// Form auto-save\nawait storage.setSecure('draft', { title: 'Post', content: '...' }, password);\n```\n\n## API\n\n### Storage\n\n```typescript\ncreateSecureLocalStorage()      // Browser: localStorage\ncreateSecureSessionStorage()    // Browser: sessionStorage\ncreateSecureMemoryStorage()     // Universal: in-memory\n```\n\n### Encryption\n\n```typescript\nimport { AesGcmEncryptor } from '@azemzemi/cryptobox';\n\nconst encryptor = new AesGcmEncryptor();\nconst encrypted = await encryptor.encrypt(data, 'password');\nconst decrypted = await encryptor.decrypt(encrypted, 'password');\n```\n\n### Custom Storage\n\n```typescript\nimport { SecureStorage, AesGcmEncryptor, IStorage } from '@azemzemi/cryptobox';\n\nclass MyStorage implements IStorage {\n  setItem(key: string, value: string): void { }\n  getItem(key: string): string | null { return null; }\n  removeItem(key: string): void { }\n}\n\nconst storage = new SecureStorage(new MyStorage(), new AesGcmEncryptor());\n```\n\n## Security\n\n- AES-256-GCM authenticated encryption\n- PBKDF2-HMAC-SHA256 (100,000 iterations)\n- Random salt and IV per operation\n- Timing-attack protection\n\nSee [SECURITY.md](SECURITY.md) for vulnerability reporting.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}