(OS)
| 78 | return c.buffer; |
| 79 | }; |
| 80 | static OS2IP(OS) { |
| 81 | if (OS instanceof Uint8Array) { |
| 82 | let offset = OS.byteOffset; |
| 83 | OS = OS.buffer.slice(offset, offset + OS.byteLength); |
| 84 | } |
| 85 | return BigInt.fromArrayBuffer(OS); |
| 86 | }; |
| 87 | static randint(max) { |
| 88 | var i = BigInt.fromArrayBuffer(RNG.get(BigInt.bitLength(max) >>> 3)); |
| 89 | while (i >= max) |