Skip to content

[wasm][tests] Use a polyfill for WebCrypto API support #42730

@kjpou1

Description

@kjpou1

Right now the System.Security.Cryptography tests uses a generic getRandomValues.

Microsoft provides a Web Cryptography polyfill API that can be used to provide the interface for testing within the CI.

Without a getRandomValues implementation the following is thrown in the CI.

ABORT: no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions