()
| 427 | } |
| 428 | |
| 429 | function getBufferedUUIDv7() { |
| 430 | uuidData ??= secureBuffer(16 * kBatchSize); |
| 431 | if (uuidData === undefined) |
| 432 | throw new ERR_OPERATION_FAILED('Out of memory'); |
| 433 | |
| 434 | if (uuidBatch === 0) randomFillSync(uuidData); |
| 435 | uuidBatch = (uuidBatch + 1) % kBatchSize; |
| 436 | const offset = uuidBatch * 16; |
| 437 | writeTimestamp(uuidData, offset); |
| 438 | return serializeUUID(uuidData, 0x70, 0x80, offset); |
| 439 | } |
| 440 | |
| 441 | function getUnbufferedUUIDv7() { |
| 442 | uuidNotBuffered ??= secureBuffer(16); |
no test coverage detected
searching dependent graphs…