(array: T)
| 9 | const uuidV7Regex = /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/ |
| 10 | |
| 11 | const getRandomValues = <T extends ArrayBufferView | null>(array: T): T => { |
| 12 | if (array instanceof Uint8Array) { |
| 13 | for (let i = 0; i < array.length; i++) { |
| 14 | array[i] = i & 0xff |
| 15 | } |
| 16 | } |
| 17 | return array |
| 18 | } |
| 19 | |
| 20 | describe("BrowserCrypto", () => { |
| 21 | it.effect("generates random bytes at and above the getRandomValues limit", () => { |