-
-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
When using uuid, it fails because of:
https://github.com/uuidjs/uuid#getrandomvalues-not-supported
It would be great to have the native platform (Android, iOS or even just Dart) polyfill crypto.getRandomValues
function insecureRandomValues (array: Uint8Array): Uint8Array {
let r = 0;
for (let i = 0; i < array.length; i++) {
if ((i & 0x03) === 0) {
r = Math.random() * 0x100000000;
}
array[i] = (r >>> ((i & 0x03) << 3)) & 0xff;
}
return array;
}
works but is insecure
Metadata
Metadata
Assignees
Labels
No labels