Bug 227611

Summary: Add BigInt64Array and BigUint64Array support to crypto.getRandomValues
Product: WebKit Reporter: Timothy Gu <timothygu99>
Component: WebCore Misc.Assignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, clopez, esprehn+autocc, ews-watchlist, fpizlo, jiewen_tan, katherine_cheney, kondapallykalyan, webkit-bug-importer, youennf, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/w3c/webcrypto/issues/255
Attachments:
Description Flags
Patch none

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].