cloudflare / cloudflare/workerd
Several crypto APIs incorrectly have have `ArrayBuffer` input types instead of `BufferSource`
Open
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
Assessment
This issue has not been assessed yet.