{"_id":"@ashish-dev-creation/emoji-crypt","_rev":"4-456dca91a2f63ffd93cf1ce21c9212c9","name":"@ashish-dev-creation/emoji-crypt","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@ashish-dev-creation/emoji-crypt","version":"1.0.0","keywords":["encryption","crypto","emoji","aes","pbkdf2"],"author":{"name":"Ashish Kumar","email":"ashish.worksspace@gmail.com"},"license":"MIT","_id":"@ashish-dev-creation/emoji-crypt@1.0.0","maintainers":[{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"}],"homepage":"https://github.com/ashish13377/emoji-crypto#readme","bugs":{"url":"https://github.com/ashish13377/emoji-crypto/issues"},"dist":{"shasum":"b16ce6ebf0e6426681f9b43bcea7c8912037de9d","tarball":"https://registry.npmjs.org/@ashish-dev-creation/emoji-crypt/-/emoji-crypt-1.0.0.tgz","fileCount":12,"integrity":"sha512-mUxNtppk7/lJx51TSBZ2sXzm+gfXIdraHlwqzt1MgIfY45eWcIfW/TjqzOzwvfeYBCilBiph5wPk3JqXy22JNw==","signatures":[{"sig":"MEUCIEvSFOCGxn+LCxVS4kwwiA1v43TPo5gcnPQB36UY1gXGAiEAmTNiYKzFJOzec5T+8o995rzV8VQglsvoRE58HOYen9I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17233},"main":"/emoji-crypto.js","types":"/types/index.d.ts","gitHead":"88a5eb74c09539d207c44a12298ef544dabd4883","scripts":{"lint":"eslint .","test":"jest"},"_npmUser":{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"},"repository":{"url":"git+https://github.com/ashish13377/emoji-crypto.git","type":"git"},"_npmVersion":"10.9.2","description":"AES-256-GCM encryption with emoji-based encoding.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"crypto":"^1.0.1","grapheme-splitter":"^1.0.4","unicode-emoji-json":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^9.31.0","globals":"^16.3.0","@eslint/js":"^9.31.0"},"_npmOperationalInternal":{"tmp":"tmp/emoji-crypt_1.0.0_1753085266783_0.3840624510039061","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ashish-dev-creation/emoji-crypt","version":"1.0.1","keywords":["encryption","crypto","emoji","aes","pbkdf2"],"author":{"name":"Ashish Kumar","email":"ashish.worksspace@gmail.com"},"license":"MIT","_id":"@ashish-dev-creation/emoji-crypt@1.0.1","maintainers":[{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"}],"homepage":"https://github.com/ashish13377/emoji-crypto#readme","bugs":{"url":"https://github.com/ashish13377/emoji-crypto/issues"},"dist":{"shasum":"617e4e5485aab8e3eda8a94c7a17b425c39079a9","tarball":"https://registry.npmjs.org/@ashish-dev-creation/emoji-crypt/-/emoji-crypt-1.0.1.tgz","fileCount":12,"integrity":"sha512-hpFHxUu06heydgb9ODKpeau0o20SOyxl/DBiEjfZyDxER1Ygv/XggloZ66c2o79yVDz7tmSB7y44yP5SXb4I2A==","signatures":[{"sig":"MEUCIHRA6DciYXZhAAE5xyE68+a49Ot8TYwz0zmpt50k7hFWAiEAg3MchNBrdOdnCrF7UwAwY5TlTuQh8zdZDxLtrUJX4l0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17429},"main":"/emoji-crypto.js","types":"/types/index.d.ts","gitHead":"16ce5b2577f9bd286dcc055e2edf8d58fe504553","scripts":{"lint":"eslint .","test":"jest","prepublishOnly":"npm run lint && npm test"},"_npmUser":{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"},"repository":{"url":"git+https://github.com/ashish13377/emoji-crypto.git","type":"git"},"_npmVersion":"10.9.2","description":"AES-256-GCM encryption with emoji-based encoding.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"crypto":"^1.0.1","grapheme-splitter":"^1.0.4","unicode-emoji-json":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^9.31.0","globals":"^16.3.0","@eslint/js":"^9.31.0"},"_npmOperationalInternal":{"tmp":"tmp/emoji-crypt_1.0.1_1753086036465_0.38888328576840303","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ashish-dev-creation/emoji-crypt","version":"1.0.2","keywords":["encryption","crypto","emoji","aes","pbkdf2"],"author":{"name":"Ashish Kumar","email":"ashish.worksspace@gmail.com"},"license":"MIT","_id":"@ashish-dev-creation/emoji-crypt@1.0.2","maintainers":[{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"}],"homepage":"https://github.com/ashish13377/emoji-crypto#readme","bugs":{"url":"https://github.com/ashish13377/emoji-crypto/issues"},"dist":{"shasum":"99e2c0f2369b08e14006d45009f074cc76e878e8","tarball":"https://registry.npmjs.org/@ashish-dev-creation/emoji-crypt/-/emoji-crypt-1.0.2.tgz","fileCount":12,"integrity":"sha512-VF6DcN1M/P+lhkPsCTB27axTLu+FbluAtv/u0BNljm/eykx3a9NneSBtE7O0iAdu80WHDeEGzkjSYR5H/ji1HQ==","signatures":[{"sig":"MEUCID6csPDBFNrRd3E8fZtHOrCZc5z8hYvRX64R9lwD3lQ/AiEAr0BoigPgjaWvzul+AnhjEV10WXQILWAMoyJG+aVjYHU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17427},"main":"emoji-crypto.js","types":"types/index.d.ts","gitHead":"9ca0e928c82d024d6b243dc5f29d8bff10d8e721","scripts":{"lint":"eslint .","test":"jest","prepublishOnly":"npm run lint && npm test"},"_npmUser":{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"},"repository":{"url":"git+https://github.com/ashish13377/emoji-crypto.git","type":"git"},"_npmVersion":"10.9.2","description":"AES-256-GCM encryption with emoji-based encoding.","directories":{},"_nodeVersion":"22.16.0","dependencies":{"crypto":"^1.0.1","grapheme-splitter":"^1.0.4","unicode-emoji-json":"^0.8.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^9.31.0","globals":"^16.3.0","@eslint/js":"^9.31.0"},"_npmOperationalInternal":{"tmp":"tmp/emoji-crypt_1.0.2_1753094433189_0.9238142874745876","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@ashish-dev-creation/emoji-crypt","version":"1.0.3","description":"AES-256-GCM encryption with emoji-based encoding.","main":"emoji-crypto.js","types":"types/index.d.ts","homepage":"https://demo-emoji-crypt.vercel.app/","scripts":{"test":"jest","lint":"eslint .","prepublishOnly":"npm run lint && npm test"},"repository":{"type":"git","url":"git+https://github.com/ashish13377/emoji-crypto.git"},"keywords":["encryption","crypto","emoji","aes","pbkdf2"],"author":{"name":"Ashish Kumar","email":"ashish.worksspace@gmail.com"},"license":"MIT","dependencies":{"crypto":"^1.0.1","grapheme-splitter":"^1.0.4","unicode-emoji-json":"^0.8.0"},"devDependencies":{"@eslint/js":"^9.31.0","eslint":"^9.31.0","globals":"^16.3.0","jest":"^29.0.0"},"_id":"@ashish-dev-creation/emoji-crypt@1.0.3","gitHead":"321d33786b064757eda8c479cd940182f35c5f73","bugs":{"url":"https://github.com/ashish13377/emoji-crypto/issues"},"_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-3h2dLtbpiWLLQr99+bMTiRR2vWWvyvMorLhBkVykZrPNviGYiyHWXSrZO/E479RR0t3VR/oTk7dVvSkX6SZuKA==","shasum":"0ed62e6371bdc3da1cb05ff8ec800225f9d3c2b5","tarball":"https://registry.npmjs.org/@ashish-dev-creation/emoji-crypt/-/emoji-crypt-1.0.3.tgz","fileCount":12,"unpackedSize":17545,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDULPRzKwRWRZ/ivu4u5QZED7+N++Wu+/buU2XxMgtarQIgZewpZMHhi/X8xsmQ/fGjdKnYwwxDghAeSf08GIX55dI="}]},"_npmUser":{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"},"directories":{},"maintainers":[{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emoji-crypt_1.0.3_1753124869821_0.09582605792755805"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-21T08:07:46.713Z","modified":"2025-07-21T19:07:50.186Z","1.0.0":"2025-07-21T08:07:46.984Z","1.0.1":"2025-07-21T08:20:36.619Z","1.0.2":"2025-07-21T10:40:33.405Z","1.0.3":"2025-07-21T19:07:50.006Z"},"bugs":{"url":"https://github.com/ashish13377/emoji-crypto/issues"},"author":{"name":"Ashish Kumar","email":"ashish.worksspace@gmail.com"},"license":"MIT","homepage":"https://demo-emoji-crypt.vercel.app/","keywords":["encryption","crypto","emoji","aes","pbkdf2"],"repository":{"type":"git","url":"git+https://github.com/ashish13377/emoji-crypto.git"},"description":"AES-256-GCM encryption with emoji-based encoding.","maintainers":[{"name":"ashish-dev-creation","email":"ashish.worksspace@gmail.com"}],"readme":"# emoji‑crypto\r\n\r\n<div align=\"center\" >\r\n  <img src=\"https://res.cloudinary.com/diyncva2v/image/upload/v1753081544/ygulghdwsx0zxooo1liv.png\" target=\"_blank\" alt=\"Ezhire App\" style=\"max-width: 50%; height: 350px; border-radius: 15px;\" />\r\n</div>\r\n\r\n---\r\n\r\n**emoji‑crypto** is a playful yet powerful Node.js library that turns raw ciphertext into walls of 📙😃🔑 emojis while keeping the underlying security rock‑solid with **AES‑256‑GCM** and **PBKDF2‑SHA‑256**. Use it to build fun chat experiences, obfuscate logs, or teach modern symmetric‑key cryptography step‑by‑step.\r\n\r\n## ✨ Features\r\n\r\n\r\n| Feature                             | Details                                                               |\r\n| ----------------------------------- | --------------------------------------------------------------------- |\r\n| 🔐**Strong encryption**             | AES‑256‑GCM for confidentiality**and**integrity                     |\r\n| 🏋️‍♀️**Robust key derivation** | PBKDF2 (SHA‑256) with configurable salt & iterations                 |\r\n| 🧩**Emoji framing**                 | 256‑emoji map → 1‑to‑1 byte representation                        |\r\n| 🚀**Stream friendly**               | Transform streams so you can pipe buffers in and encrypted‑emoji out |\r\n| ☑️**Typed**                       | Full TypeScript type declarations included                            |\r\n| 🛠**Hackable**                      | Swap out the emoji map, KDF params, IV length, etc. via`configure()`  |\r\n\r\n## 📦 Installation\r\n\r\n[![npm version](https://badge.fury.io/js/%40ashish-dev-creation%2Femoji-crypt.svg)](https://www.npmjs.com/package/@ashish-dev-creation/emoji-crypt)\r\n\r\n[Live Demo on Vercel](https://demo-emoji-crypt.vercel.app/)\r\n\r\n```bash\r\nnpm install @ashish-dev-creation/emoji-crypt\r\n# or\r\nyarn add @ashish-dev-creation/emoji-crypt\r\n```\r\n\r\n## ⚡ Quick Start\r\n\r\n```js\r\nimport { EmojiCrypto } from 'emoji-crypto';\r\n\r\n// 1. Create an instance (passphrase or raw key)\r\nconst crypto = new EmojiCrypto('correct horse battery staple');\r\n\r\n// 2. Encrypt text → emoji wall\r\nconst secret = crypto.encrypt('Hello, world!');\r\nconsole.log(secret); // 🥳🔒🤖🌟…\r\n\r\n// 3. Decrypt emoji back → text\r\nconsole.log(crypto.decrypt(secret)); // \"Hello, world!\"\r\n```\r\n\r\n## 🛠 Customising with `configure()`\r\n\r\nNeed a different security posture or branded emojis? Create your own **factory** using `configure(overrides)`:\r\n\r\n```js\r\nimport { configure } from 'emoji-crypto';\r\n\r\n// Bring your own 256‑emoji array (✅ must be *single‑grapheme* emojis)\r\nimport my256EmojiArray from './myEmojiBank.js';\r\n\r\n// 1️⃣ Build a custom constructor\r\nconst CustomCrypto = configure({\r\n  // 🔑 Key‑derivation tweaks (⬆️ default: 100k iterations, 16‑byte salt)\r\n  keyDerivation: {\r\n    iterations: 500_000,\r\n    saltBytes: 32,      // bigger random salt\r\n  },\r\n  // 🖼 Custom emoji alphabet\r\n  emojiMap: my256EmojiArray,\r\n});\r\n\r\n// 2️⃣ Use like the default class\r\nconst crypto = new CustomCrypto('sup3rs3cret');\r\nconst msg = crypto.encrypt('🔒 personalised & stronger!');\r\n```\r\n\r\n> **Heads‑up**: Under the hood the call above just merges your `overrides` onto the defaults exported from **`src/config.js`**. See code snippet below.\r\n\r\n### Default Configuration (from [`src/config.js`](https://chatgpt.com/c/src/config.js))\r\n\r\n```js\r\nconst DEFAULT = {\r\n  algorithm: 'aes-256-gcm',\r\n  ivBytes: 12,               // 96‑bit IV (recommended for GCM)\r\n  keyDerivation: {\r\n    saltBytes: 16,\r\n    iterations: 100_000,\r\n    hash: 'sha256',\r\n    keyLen: 32,             // 256‑bit key\r\n  },\r\n  emojiMap: DEFAULT_EMOJI_MAP, // first 256 single‑grapheme emojis\r\n};\r\n```\r\n\r\n`configure()` simply does:\r\n\r\n```js\r\nmodule.exports.configure = (overrides = {}) =>\r\n  class EmojiCryptoCustom extends EmojiCrypto {\r\n    static CONFIG = deepMerge(DEFAULT, overrides);\r\n  };\r\n```\r\n\r\n## 📚 API Reference\r\n\r\n\r\n| Method                                       | Description                                                                                 |\r\n| -------------------------------------------- | ------------------------------------------------------------------------------------------- |\r\n| \\`new EmojiCrypto(password                   | key[, options])\\`                                                                           |\r\n| `encrypt(plaintext[, encoding])`             | Returns emoji string. Optional`encoding`(utf8/hex/b64) treated as plaintext input encoding. |\r\n| `decrypt(emojiCiphertext[, outputEncoding])` | Returns decrypted text (default**utf8**).                                                   |\r\n| `static configure(overrides)`                | **Preferred**helper to produce a tailored subclass.                                         |\r\n\r\n## 🔬 How it works\r\n\r\n1. **Derive key** — PBKDF2‑SHA‑256 → 256‑bit key (configurable iterations/salt length).\r\n2. **Encrypt** — AES‑256‑GCM with random IV (12 bytes by default).\r\n3. **Map bytes → emojis** — Each ciphertext byte (0‑255) indexes into the 256‑emoji map.\r\n4. **Append auth tag & IV** — Also converted to emoji and concatenated.\r\n\r\nBecause emojis are multibyte UTF‑8 characters, ciphertext expands \\~4× in size, but stays printable, share‑friendly, and—most importantly—fun.\r\n\r\n## 🖼 Choosing a custom emoji map\r\n\r\n* Exactly **256 distinct single‑grapheme emojis**.\r\n* Avoid skin‑tone variants and multi‑character sequences (flags, ❤️‍🔥, etc.).\r\n* Check with the supplied helper:\r\n\r\n```js\r\nimport { validateEmojiSet } from 'emoji-crypto/tools';\r\nvalidateEmojiSet(my256EmojiArray); // throws if not valid\r\n```\r\n\r\n## 📝 License\r\n\r\nThis project is licensed under the [MIT License](https://github.com/ashish13377/emoji-crypto?tab=MIT-1-ov-file)\r\n","readmeFilename":"README.md"}