Better HN
topnewbestaskshowjobs
Log inSign up

psafronov

8 karma · joined Oct 4, 2023 (3y ago) · 3 submissions

Submissions

comment 5mo ago · link · parent

The need for loading the file into memory comes down to WebCrypto's AES-GCM being one-shot: crypto.subtle.encrypt calculates a single auth tag over the entire message and there's no incremental/update() API, so the whole file has to be one contiguous buffer.

The fix is chunked AEAD (per-chunk IV+tag), encrypting/decrypting a chunk at a time. It's on the roadmap, just haven't gotten around to it yet: https://gitlab.com/PavelSafronov/engye#large-file-support-st...

That feature is also a good opportunity to switch to FileSystemWritableFileStream/Blob for writes, which will reduce the memory requirements when writing files to disk.

2.

Show HN: Engye – transfer files between any two devices by scanning a QR code(engye.fuzzyworld.net ↗)

15 points · by psafronov · 5mo ago · 2 comments

comment 2y ago · link · parent

Not OP, but I've been using a similar HTML file (local at first, now hosted on GitLab) that does the same thing, though I use it with Firefox and Tree Style Tab to organize hundreds of tabs.

Info about the HTML page: https://gitlab.com/PavelSafronov/tools/-/tree/main/separator...

Page itself, bookmark this: https://pavelsafronov.gitlab.io/tools/separator-page/index.h...

The approach I follow is to be able to set the title of the page as well as the contents, and the tab now acts as a labeled container of other tabs. The contents are stored in the URL, same as OP, so the same caveats apply.