{"_id":"@pdfsmaller/pdf-encrypt-lite","_rev":"5-ec799b8d2b7eaa5d85855f64de1164b1","name":"@pdfsmaller/pdf-encrypt-lite","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@pdfsmaller/pdf-encrypt-lite","version":"1.0.0","keywords":["pdf","encryption","pdf-encryption","RC4","128-bit","cloudflare","edge","workers","lightweight","tiny","browser","password-protection","pdf-lib","pdfsmaller"],"author":{"url":"https://pdfsmaller.com","name":"PDFSmaller.com","email":"hello@pdfsmaller.com"},"license":"MIT","_id":"@pdfsmaller/pdf-encrypt-lite@1.0.0","maintainers":[{"name":"smither777","email":"ericpaolosmith@gmail.com"}],"homepage":"https://pdfsmaller.com","bugs":{"url":"https://github.com/smither777/pdfsmaller-pdfencryptlite/issues"},"dist":{"shasum":"6010b77de2553f38ff848467c8dbcfda79c00df3","tarball":"https://registry.npmjs.org/@pdfsmaller/pdf-encrypt-lite/-/pdf-encrypt-lite-1.0.0.tgz","fileCount":10,"integrity":"sha512-kWzHPusWmeIlQmExzg8hO+loJCOw3842eReLH7QY/JkElcmOq7AmnRhYKtVIe9Awz63jadiN9YFMgo2ue7P+SA==","signatures":[{"sig":"MEUCIQCoETGCIG7Kdow2xR5dspJjVvWjJAzcoHOj2EFuhwusUwIgJdGDUzkUpLaOS8ATSJbsHy8+FUis3RaT9PXsZ7xaz6A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47199},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"gitHead":"37817b0b7911638020d26e21a5f8c7368e5731cd","scripts":{"test":"node test/test.js","build":"node build.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"smither777","email":"ericpaolosmith@gmail.com"},"repository":{"url":"git+https://github.com/smither777/pdfsmaller-pdfencryptlite.git","type":"git"},"_npmVersion":"11.3.0","description":"Ultra-lightweight PDF encryption (7KB) with real RC4 128-bit encryption. Built for edge environments like Cloudflare Workers. Powers PDFSmaller.com's encryption.","directories":{},"_nodeVersion":"24.1.0","_hasShrinkwrap":false,"devDependencies":{"pdf-lib":"^1.17.1"},"peerDependencies":{"pdf-lib":"^1.17.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-encrypt-lite_1.0.0_1755750507942_0.3677728048272553","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@pdfsmaller/pdf-encrypt-lite","version":"1.0.1","keywords":["pdf","encryption","pdf-encryption","RC4","128-bit","cloudflare","edge","workers","lightweight","tiny","browser","password-protection","pdf-lib","pdfsmaller"],"author":{"url":"https://pdfsmaller.com","name":"PDFSmaller.com","email":"hello@pdfsmaller.com"},"license":"MIT","_id":"@pdfsmaller/pdf-encrypt-lite@1.0.1","maintainers":[{"name":"smither777","email":"ericpaolosmith@gmail.com"}],"homepage":"https://pdfsmaller.com","bugs":{"url":"https://github.com/smither777/pdfsmaller-pdfencryptlite/issues"},"dist":{"shasum":"dbe3c4529c069123454c8a971406af982e0a4dd8","tarball":"https://registry.npmjs.org/@pdfsmaller/pdf-encrypt-lite/-/pdf-encrypt-lite-1.0.1.tgz","fileCount":10,"integrity":"sha512-9giOp0WRqGqV/dwDSMJFBLaYe3IFmyQWvmQDeY//VZOGTQIvWHAfncV+6NSgdAjoCpUilHdXTJx0X/6YF1gegw==","signatures":[{"sig":"MEYCIQDWrrBU3Ecwa0UAupR8XZxuZfV+x4kqJTK/1vPEJkIKaQIhAP10EEm8mpsmV/Jd8ktBnENZZ5sSu1SEgo3KppuQ/qZA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47319},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"gitHead":"16b6fc7b8338df5690d1916afdc26b4bbcf48abf","scripts":{"test":"node test/test.js","build":"node build.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"smither777","email":"ericpaolosmith@gmail.com"},"repository":{"url":"git+https://github.com/smither777/pdfsmaller-pdfencryptlite.git","type":"git"},"_npmVersion":"11.5.1","description":"Ultra-lightweight PDF encryption (7KB) with real RC4 128-bit encryption. Built for edge environments like Cloudflare Workers. Powers PDFSmaller.com's encryption.","directories":{},"_nodeVersion":"24.7.0","_hasShrinkwrap":false,"devDependencies":{"pdf-lib":"^1.17.1"},"peerDependencies":{"pdf-lib":"^1.17.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-encrypt-lite_1.0.1_1765292936761_0.8463491426600929","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@pdfsmaller/pdf-encrypt-lite","version":"1.0.2","keywords":["pdf","encryption","pdf-encryption","RC4","128-bit","cloudflare","edge","workers","lightweight","tiny","browser","password-protection","pdf-lib","pdfsmaller"],"author":{"url":"https://pdfsmaller.com","name":"PDFSmaller.com","email":"hello@pdfsmaller.com"},"license":"MIT","_id":"@pdfsmaller/pdf-encrypt-lite@1.0.2","maintainers":[{"name":"smither777","email":"ericpaolosmith@gmail.com"}],"homepage":"https://pdfsmaller.com","bugs":{"url":"https://github.com/smither777/pdfsmaller-pdfencryptlite/issues"},"dist":{"shasum":"20beebc5232709d9868bd2a881acad7e3b8699b7","tarball":"https://registry.npmjs.org/@pdfsmaller/pdf-encrypt-lite/-/pdf-encrypt-lite-1.0.2.tgz","fileCount":10,"integrity":"sha512-9egzPJ9I6gfmRP7BJjN3M1dt99DagF72BpQneVke1vgXAeIAU38i2YAt+EBvwbaYTmn7CFu/Z6IeIhoe0p/YQg==","signatures":[{"sig":"MEQCIEBMEmeP5GKHaJaZcv56puwD9LxYz6ZZyK5Rtu3tBI7BAiBKsi+wqXGYa8x7eq8K0o9S/RT6iNlMh4gBuLVUidsi7Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49093},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"3a16020214d74639aaa800161e0aa91484417691","scripts":{"test":"node test/test.js","build":"node build.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"smither777","email":"ericpaolosmith@gmail.com"},"repository":{"url":"git+https://github.com/smither777/pdfsmaller-pdfencryptlite.git","type":"git"},"_npmVersion":"11.8.0","description":"Ultra-lightweight PDF encryption (7KB) with real RC4 128-bit encryption. Built for edge environments like Cloudflare Workers. Powers PDFSmaller.com's encryption.","directories":{},"_nodeVersion":"24.7.0","_hasShrinkwrap":false,"devDependencies":{"pdf-lib":"^1.17.1"},"peerDependencies":{"pdf-lib":"^1.17.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-encrypt-lite_1.0.2_1772004447592_0.5262390865038642","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@pdfsmaller/pdf-encrypt-lite","version":"1.1.0","keywords":["pdf","encryption","pdf-encryption","RC4","128-bit","cloudflare","edge","workers","lightweight","tiny","browser","password-protection","pdf-lib","pdfsmaller"],"author":{"url":"https://pdfsmaller.com","name":"PDFSmaller.com","email":"hello@pdfsmaller.com"},"license":"MIT","_id":"@pdfsmaller/pdf-encrypt-lite@1.1.0","maintainers":[{"name":"smither777","email":"ericpaolosmith@gmail.com"}],"homepage":"https://pdfsmaller.com","bugs":{"url":"https://github.com/smither777/pdfsmaller-pdfencryptlite/issues"},"dist":{"shasum":"18bb8df5e779e0abafc7e2209b9c78890dbd2bf5","tarball":"https://registry.npmjs.org/@pdfsmaller/pdf-encrypt-lite/-/pdf-encrypt-lite-1.1.0.tgz","fileCount":13,"integrity":"sha512-QGRScRRkTZC/hy9xzE3qMEZOF5qBY9z0GmR2qqCTBIhXMeB8ee1Aqc31VwRcZiEC16JKmyiFz/Qs0sKzX0Tzog==","signatures":[{"sig":"MEUCIAD+ql7i1gwvEXCDr8b8Fy2ogeMdpsIGGxTvBTw4lqaOAiEA5jVLIk4m2BTHdrF+yXuSy7X9gcBiFoD6zS/mpGd6ZVs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69622},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"e1e89b129e8a77c65fc00ccc14a0b9bb7923f0c2","scripts":{"test":"node test.js","build":"node build.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"smither777","email":"ericpaolosmith@gmail.com"},"repository":{"url":"git+https://github.com/smither777/pdfsmaller-pdfencryptlite.git","type":"git"},"_npmVersion":"11.13.0","description":"Ultra-lightweight PDF encryption (~9KB) with real RC4 128-bit encryption. Built for edge environments like Cloudflare Workers. Powers PDFSmaller.com's encryption.","directories":{},"_nodeVersion":"24.17.0","_hasShrinkwrap":false,"devDependencies":{"pdf-lib":"^1.17.1"},"peerDependencies":{"pdf-lib":"^1.17.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf-encrypt-lite_1.1.0_1785250287178_0.028080725555249098","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@pdfsmaller/pdf-encrypt-lite","version":"1.2.0","description":"Ultra-lightweight PDF encryption (~9KB) with real RC4 128-bit encryption. Built for edge environments like Cloudflare Workers. Powers PDFSmaller.com's encryption.","type":"commonjs","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"node build.js","test":"node test.js","prepublishOnly":"npm run build"},"keywords":["pdf","encryption","pdf-encryption","RC4","128-bit","cloudflare","edge","workers","lightweight","tiny","browser","password-protection","pdf-lib","pdfsmaller"],"author":{"name":"PDFSmaller.com","email":"hello@pdfsmaller.com","url":"https://pdfsmaller.com"},"homepage":"https://pdfsmaller.com","repository":{"type":"git","url":"git+https://github.com/smither777/pdfsmaller-pdfencryptlite.git"},"bugs":{"url":"https://github.com/smither777/pdfsmaller-pdfencryptlite/issues"},"license":"MIT","engines":{"node":">=14.0.0"},"peerDependencies":{"pdf-lib":"^1.17.1"},"devDependencies":{"pdf-lib":"^1.17.1"},"gitHead":"8b2bae1ef217397305a5bee47492be85ad72e5b2","_id":"@pdfsmaller/pdf-encrypt-lite@1.2.0","_nodeVersion":"24.17.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-CDSO++RmprLUyaDwk7M2YFPh50UASMpMm27Uki4lVmh/Y73bfF6R+y/c4kKBdMlBu9YICfiYTjD6B3MPOTu75Q==","shasum":"8d03879770ac9593ce60e470e1134e7f0449cb62","tarball":"https://registry.npmjs.org/@pdfsmaller/pdf-encrypt-lite/-/pdf-encrypt-lite-1.2.0.tgz","fileCount":14,"unpackedSize":108696,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDN6+niRn/aXGm76jdgQQHQIKgKlFqbFC5kWlvUxJBJ/wIgUKp7g0UM3ZK8Qx71Bbd2wcNZGf7lgFNzF6L9BjTKuDw="}]},"_npmUser":{"name":"smither777","email":"ericpaolosmith@gmail.com"},"directories":{},"maintainers":[{"name":"smither777","email":"ericpaolosmith@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdf-encrypt-lite_1.2.0_1785252049014_0.12236189217205329"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-21T04:28:27.860Z","modified":"2026-07-28T15:20:49.345Z","1.0.0":"2025-08-21T04:28:28.119Z","1.0.1":"2025-12-09T15:08:56.910Z","1.0.2":"2026-02-25T07:27:27.734Z","1.1.0":"2026-07-28T14:51:27.314Z","1.2.0":"2026-07-28T15:20:49.161Z"},"bugs":{"url":"https://github.com/smither777/pdfsmaller-pdfencryptlite/issues"},"author":{"name":"PDFSmaller.com","email":"hello@pdfsmaller.com","url":"https://pdfsmaller.com"},"license":"MIT","homepage":"https://pdfsmaller.com","keywords":["pdf","encryption","pdf-encryption","RC4","128-bit","cloudflare","edge","workers","lightweight","tiny","browser","password-protection","pdf-lib","pdfsmaller"],"repository":{"type":"git","url":"git+https://github.com/smither777/pdfsmaller-pdfencryptlite.git"},"description":"Ultra-lightweight PDF encryption (~9KB) with real RC4 128-bit encryption. Built for edge environments like Cloudflare Workers. Powers PDFSmaller.com's encryption.","maintainers":[{"name":"smither777","email":"ericpaolosmith@gmail.com"}],"readme":"# pdf-encrypt-lite 🔒\n\n> **⚠️ Upgrade to 1.1.0.** Versions 1.0.x wrote encrypted strings into PDF\n> literal strings without escaping them, which corrupted any PDF containing\n> literal strings — form field names, JavaScript actions, metadata. Passwords\n> with non-ASCII characters also produced files no reader could open. See\n> [CHANGELOG.md](CHANGELOG.md).\n\n\n**Ultra-lightweight PDF encryption library (~9KB gzipped) with real RC4 128-bit encryption**\n\nBuilt by [PDFSmaller.com](https://pdfsmaller.com) - Try our free online PDF tools with this encryption built-in!\n\n[![NPM Version](https://img.shields.io/npm/v/@pdfsmaller/pdf-encrypt-lite.svg)](https://www.npmjs.com/package/@pdfsmaller/pdf-encrypt-lite)\n[![Size](https://img.shields.io/badge/size-9KB-green)](https://bundlephobia.com/package/@pdfsmaller/pdf-encrypt-lite)\n[![License](https://img.shields.io/npm/l/@pdfsmaller/pdf-encrypt-lite.svg)](https://github.com/smither777/pdfsmaller-pdfencryptlite/blob/main/LICENSE)\n[![Powered by PDFSmaller](https://img.shields.io/badge/Powered%20by-PDFSmaller.com-blue)](https://pdfsmaller.com)\n\n## 🚀 Why pdf-encrypt-lite?\n\nWhen building [PDFSmaller.com](https://pdfsmaller.com/protect-pdf), we needed real PDF encryption that worked within Cloudflare Workers' 1MB limit. Every existing solution was 2-20MB+ in size. We were told it was \"impossible\" to implement proper PDF encryption in such a small package.\n\n**We proved them wrong.**\n\nThis library is the exact encryption engine that powers [PDFSmaller.com's Protect PDF tool](https://pdfsmaller.com/protect-pdf) - battle-tested on thousands of PDFs daily.\n\n### The Problem We Solved:\n- ❌ **node-forge**: 1.7MB minified\n- ❌ **crypto-js**: 234KB (still too large with pdf-lib)\n- ❌ **Native crypto**: Not available in many edge environments\n- ✅ **pdf-encrypt-lite**: ~9KB gzipped! 🎉\n\n## ✨ Features\n\n- 🔐 **Real PDF encryption** - RC4 128-bit encryption that actually works\n- 📦 **Tiny size** - ~9KB gzipped (MD5 + RC4 + PDFDocEncoding)\n- ⚡ **Edge-ready** - Works in Cloudflare Workers, Vercel Edge, Deno Deploy\n- 🌐 **Browser compatible** - No Node.js dependencies\n- 📱 **Password protection** - PDFs prompt for password in any reader\n- 🛡️ **PDF Standard compliant** - Implements Algorithm 2 & 3 from PDF spec\n- 🚀 **Zero dependencies** - Just needs pdf-lib as peer dependency\n\n## 📥 Installation\n\n```bash\nnpm install @pdfsmaller/pdf-encrypt-lite pdf-lib\n```\n\n## 💻 Usage\n\n```javascript\nimport { encryptPDF } from '@pdfsmaller/pdf-encrypt-lite';\nimport { PDFDocument } from 'pdf-lib';\n\n// Basic usage\nconst encryptedPdfBytes = await encryptPDF(existingPdfBytes, 'user-password');\n\n// With separate owner password\nconst withOwnerPassword = await encryptPDF(\n  existingPdfBytes, \n  'user-password',\n  'owner-password'\n);\n\n// Full example\nasync function protectPDF() {\n  // Load your PDF\n  const existingPdfBytes = await fetch('document.pdf').then(res => res.arrayBuffer());\n  \n  // Encrypt it with pdf-encrypt-lite\n  const encryptedBytes = await encryptPDF(\n    new Uint8Array(existingPdfBytes),\n    'secret123',\n    'owner456'\n  );\n  \n  // Save the encrypted PDF\n  const blob = new Blob([encryptedBytes], { type: 'application/pdf' });\n  const url = URL.createObjectURL(blob);\n  const a = document.createElement('a');\n  a.href = url;\n  a.download = 'protected.pdf';\n  a.click();\n}\n```\n\n## 🌐 Browser (no bundler)\n\nFor environments with no build step — SharePoint script editors, classic\nASP.NET pages, plain HTML — use the UMD build. It reads pdf-lib from the global\nthat `pdf-lib.min.js` installs, so load that first:\n\n```html\n<script src=\"pdf-lib.min.js\"></script>\n<script src=\"node_modules/@pdfsmaller/pdf-encrypt-lite/dist/pdf-encrypt-lite.umd.js\"></script>\n<script>\n  (async () => {\n    const bytes = new Uint8Array(await (await fetch('form.pdf')).arrayBuffer());\n    const out = await PDFEncryptLite.encryptPDF(bytes, '', {\n      ownerPassword: 'owner-secret',\n      allowPrinting: true,\n      allowFillingForms: true,\n    });\n  })();\n</script>\n```\n\n`PDFEncryptLite` is the global. RC4 does not use `crypto.subtle`, so it works\noutside a secure context — over plain HTTP, in old browsers, anywhere.\n\nWhen the source PDF has no file ID one is generated, preferring\n`crypto.getRandomValues()` and falling back to `Math.random()` if Web Crypto is\nabsent entirely. That fallback is not cryptographically strong; the file ID is\nnot secret and the key's strength comes from the password, but prefer a\ncontext where `crypto.getRandomValues()` exists.\n\n## 🔐 Permissions\n\nThe third argument accepts either the owner password directly or an options\nobject with the same permission flags as\n[@pdfsmaller/pdf-encrypt](https://www.npmjs.com/package/@pdfsmaller/pdf-encrypt):\n\n```js\n// owner password only — unchanged, all permissions allowed\nawait encryptPDF(pdfBytes, 'user-pw', 'owner-pw');\n\n// or granular permissions\nawait encryptPDF(pdfBytes, 'user-pw', {\n  ownerPassword: 'owner-pw',\n  allowPrinting: true,\n  allowFillingForms: true,   // also covers signing an existing signature field\n  allowModifying: false,\n  allowCopying: false,\n});\n```\n\n### Permissions without an open password\n\nPassing an empty string as the user password produces a PDF that opens without\nprompting but still declares its permissions; conforming readers require the\nowner password to change them:\n\n```js\nawait encryptPDF(pdfBytes, '', { ownerPassword: 'owner-secret', allowPrinting: true });\n```\n\nPDF permissions are advisory: conforming readers honour them, but nothing\ncryptographically prevents a determined tool from ignoring them. Use a user\npassword if the content itself must stay confidential.\n\n## 🔥 Use Cases\n\nPerfect for:\n- **Edge Functions** (Cloudflare Workers, Vercel Edge, Netlify Edge)\n- **Browser applications** (Like [PDFSmaller.com](https://pdfsmaller.com))\n- **Serverless functions** with size limits\n- **Client-side PDF protection** without server uploads\n- **Lightweight Node.js applications**\n\n## 🎯 Real-World Example\n\nSee it in action at [PDFSmaller.com/protect-pdf](https://pdfsmaller.com/protect-pdf) - our free online tool uses this exact library to encrypt PDFs directly in your browser. No uploads, no server processing, just pure client-side encryption!\n\n## 🏗️ How It Works\n\nWe built custom implementations of:\n1. **MD5 hashing** - For password processing per PDF spec\n2. **RC4 encryption** - For content encryption\n3. **PDF object traversal** - Encrypts all strings and streams\n4. **Standard Security Handler** - Implements PDF encryption spec\n\nTotal size: ~9KB gzipped 🤯\n\n## 📊 Comparison\n\n| Library | Size | Real Encryption | Edge Compatible |\n|---------|------|-----------------|-----------------|\n| pdf-encrypt-lite | **~9KB** (gzipped) ✅ | ✅ | ✅ |\n| node-forge | 1,700KB | ✅ | ❌ |\n| crypto-js | 234KB | ✅ | ⚠️ |\n| pdf-lib alone | 0KB | ❌ | ✅ |\n\n## 🤝 Contributing\n\nWe welcome contributions! This library powers [PDFSmaller.com](https://pdfsmaller.com), so we maintain high standards for security and compatibility.\n\n## 📜 License\n\nMIT License - Use it freely in your projects!\n\n## 🙏 Credits\n\nBuilt with ❤️ by [PDFSmaller.com](https://pdfsmaller.com) - Your free PDF toolkit\n\nIf this library helps you, check out our other free PDF tools:\n- [Compress PDF](https://pdfsmaller.com/compress-pdf) - Reduce PDF size by up to 90%\n- [Merge PDF](https://pdfsmaller.com/merge-pdf) - Combine multiple PDFs\n- [Split PDF](https://pdfsmaller.com/split-pdf) - Extract pages from PDFs\n- [Protect PDF](https://pdfsmaller.com/protect-pdf) - Uses this library!\n- [20+ more tools](https://pdfsmaller.com) - All free, all private\n\n## 🚀 Quick Start for Cloudflare Workers\n\n```javascript\nexport default {\n  async fetch(request, env) {\n    const formData = await request.formData();\n    const file = formData.get('pdf');\n    const password = formData.get('password');\n    \n    const pdfBytes = new Uint8Array(await file.arrayBuffer());\n    const encrypted = await encryptPDF(pdfBytes, password);\n    \n    return new Response(encrypted, {\n      headers: { 'Content-Type': 'application/pdf' }\n    });\n  }\n}\n```\n\n## 📧 Support\n\n- 🐛 [Report issues](https://github.com/smither777/pdfsmaller-pdfencryptlite/issues)\n- 💡 [Request features](https://github.com/smither777/pdfsmaller-pdfencryptlite/issues)\n- 🌐 [Visit PDFSmaller.com](https://pdfsmaller.com)\n- 📧 [Contact us](https://pdfsmaller.com/contact)\n\n---\n\n**⭐ Star this repo if it helps you!**\n\n*Built because we needed it. Shared because you might too.*\n\n[PDFSmaller.com](https://pdfsmaller.com) - Free PDF Tools That Actually Work™","readmeFilename":"README.md"}