stackedit/test/unit/mocks/cryptoMock.js
2024-02-19 17:25:32 +08:00

8 lines
161 B
JavaScript

window.crypto = {
getRandomValues(array) {
for (let i = 0; i < array.length; i += 1) {
array[i] = Math.floor(Math.random() * 1000000);
}
},
};