w3c / w3c/webcrypto

Accept Blob and SharedArrayBuffer too?

Open
#216 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs implementor interest proposal
Dominant language
HTML
Stars
294
Forks
78
PR merge metrics
No merged PRs in 30d

Description

I wonder about 2 things...
Why isn't this supported?

crypto.subtle.digest(opts, new Blob(['hello world']))
crypto.subtle.digest(opts, new SharedArrayBuffer(20))
crypto.getRandomValues(new Uint8Array(new SharedArrayBuffer(20)))

Can we add support for them?
Usecase: allow a client to select a 2gb+ File from the file system and hash/encrypt it without having to read the hole thing into memory

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the crypto.subtle.digest and crypto.getRandomValues examples in the issue, including Blob and SharedArrayBuffer inputs and the 2GB+ file use case. Determine the required API behavior and acceptance criteria for supporting these inputs; the issue names no repository files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.