dart-sdk/sdk/lib/_internal
Ömer Sinan Ağacan 12859761b9 [dart2wasm] Implement _SecureRandom._getBytes
This only changes `_SecureRandom._getBytes` to make the rest of the code
work. Implementation is currently slow: for each random number
generation, it allocates one JS `Uint8Array`, and because we can't
directly read from a JS `Uint8Array` using `dart:js_interop`, a Dart
`Uint8List` wrapper for it. We can optimize separately.

Fixes #55031.

Fixes test lib/math/random_secure_test on browsers. The test keeps
failing in d8 as d8 doesn't define the `crypto` object.

Change-Id: I9d6bbd1bb576c0d0b7206cb2939ee65d987ec297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356040
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-03-12 21:26:51 +00:00
..
js_dev_runtime [ddc] Cleanup dynamic calls in native_typed_data 2024-03-06 00:51:15 +00:00
js_runtime Make all platforms return null from Error.stackTrace until thrown. 2024-02-27 23:01:06 +00:00
js_shared [js_dev_runtime] dart format --fix 2024-01-30 20:41:20 +00:00
sdk_library_metadata [dart2js] Convert some collections of const ints to enums 2024-02-23 19:52:50 +00:00
vm [ Service ] Fix --write-service-info on Windows 2024-03-11 20:16:08 +00:00
vm_shared/lib [vm/wasm] Make HashMap<K, V> use non-generic _HashMapEntry object 2024-03-12 14:36:38 +00:00
wasm [dart2wasm] Implement _SecureRandom._getBytes 2024-03-12 21:26:51 +00:00
wasm_js_compatibility/lib [dart:js_interop] Move JS types to extension types 2023-12-06 21:59:58 +00:00
allowed_experiments.json Retire 3.3 experiments in the 3.4 release. 2024-03-04 16:09:31 +00:00
fix_data.yaml Remove duplicated FileMode fixes 2021-10-11 13:58:43 +00:00