Bug 227611 - Add BigInt64Array and BigUint64Array support to crypto.getRandomValues
Summary: Add BigInt64Array and BigUint64Array support to crypto.getRandomValues
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL: https://github.com/w3c/webcrypto/issu...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-01 23:41 PDT by Timothy Gu
Modified: 2021-07-09 09:02 PDT (History)
11 users (show)

See Also:


Attachments
Patch (145.68 KB, patch)
2021-07-09 00:40 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Gu 2021-07-01 23:41:50 PDT
Given

    const b = new BigInt64Array(10);
    crypto.getRandomValues(b);

I would expect b to be filled with randomly generated 64-bit integers. However, instead I get

    TypeMismatchError: The type of an object was incompatible with the expected type of the parameter associated to the object.

Spec change is pending on https://github.com/w3c/webcrypto/issues/255. Tests are in https://github.com/web-platform-tests/wpt/pull/29565.
Comment 1 Radar WebKit Bug Importer 2021-07-08 23:42:15 PDT
<rdar://problem/80362280>
Comment 2 Yusuke Suzuki 2021-07-09 00:40:57 PDT
Created attachment 433202 [details]
Patch
Comment 3 EWS 2021-07-09 09:02:42 PDT
Committed r279785 (239552@main): <https://commits.webkit.org/239552@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 433202 [details].