Skip to content

feat: support multiple file encryption with ZIP archive mode#16

Draft
valerius21 wants to merge 1 commit intomainfrom
issue-8
Draft

feat: support multiple file encryption with ZIP archive mode#16
valerius21 wants to merge 1 commit intomainfrom
issue-8

Conversation

@valerius21
Copy link
Owner

Summary

Adds multi-file support to Seal3D, closing #8.

  • Users can now select multiple files via drag-and-drop or file picker
  • When multiple files are selected in encrypt mode, a toggle appears to choose between:
    • ZIP Archive (default): bundles all files into a ZIP, encrypts it, downloads as seal3d-archive.zip.encrypted
    • Individual Files: encrypts each file separately, downloads sequentially as file.name.encrypted
  • Single-file encryption/decryption behavior is unchanged (backward compatible)
  • Decryption of a .zip.encrypted yields the .zip — user extracts with OS tools

Changes

File What
package.json Added fflate@0.8.2 (ZIP library, ~8KB gzipped, zero deps)
lib/zip.ts New — createZipFromFiles, extractZip, verifyZip, listZipEntries
lib/zip.test.ts New — 18 tests covering all ZIP utility functions
components/file-drop-zone.tsx Updated — accepts File[], multi-select, file list with remove buttons
components/archive-toggle.tsx New — toggle between archive and individual encryption modes
app/page.tsx Updated — multi-file state, 3 encrypt paths, multi-file decrypt
lib/crypto.test.ts Updated — 7 new integration tests for multi-file encrypt/decrypt

Test Coverage

  • 47 tests passing (1 skipped: opt-in large-file test)
  • zip.ts: 100% across all metrics
  • crypto.ts: 99% lines
  • Overall: 96.4% statements, 99.3% lines, 100% functions

Closes #8

Add multi-file support to Seal3D. Users can now select multiple files
and choose between two encryption modes:

- Archive: bundles all files into a ZIP archive (via fflate), then
  encrypts the archive as a single .zip.encrypted download
- Individual: encrypts each file separately with sequential downloads

Single-file behavior is unchanged (backward compatible). Decryption
yields the decrypted file as-is (.zip for archives).

Closes #8
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
seal3d fc0b209 Commit Preview URL

Branch Preview URL
Feb 20 2026, 07:12 PM

@valerius21 valerius21 marked this pull request as draft February 20, 2026 23:28
@valerius21
Copy link
Owner Author

needs more testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow to use multiple files

1 participant