Stackedit/test/unit/mocks/cryptoMock.js

8 lines
161 B
JavaScript
Raw Permalink Normal View History

2018-06-07 23:56:11 +00:00
window.crypto = {
getRandomValues(array) {
for (let i = 0; i < array.length; i += 1) {
array[i] = Math.floor(Math.random() * 1000000);
}
},
};