cloudflare / cloudflare/workerd

Several crypto APIs incorrectly have have `ArrayBuffer` input types instead of `BufferSource`

Open
#2,549 0 comments 0 reactions 1 assignee Claimed by @workers-devprod View on GitHub
types
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

Just to name the examples that I've encountered:
- `SubtleCryptoEncryptAlgorithm.iv`
- `SubtleCryptoEncryptAlgorithm.counter`
- `SubtleCryptoGenerateKeyAlgorithm.publicExponent`

I suspect there could be many other instances too.

These have the `ArrayBuffer` type which is incorrectly too restrictive when they should have the `BufferSource` type (which accepts `ArrayBuffer`, `TypedArray`s and `DataView` as per the spec).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.