◐ Shell
clean mode source ↗

doc: note non-monotonic clock in crypto.randomUUIDv7 · nodejs/node@1684ab8

Original file line numberDiff line numberDiff line change

@@ -5822,7 +5822,9 @@ added: REPLACEME

58225822

Generates a random [RFC 9562][] version 7 UUID. The UUID contains a millisecond

58235823

precision Unix timestamp in the most significant 48 bits, followed by

58245824

cryptographically secure random bits for the remaining fields, making it

5825-

suitable for use as a database key with time-based sorting.

5825+

suitable for use as a database key with time-based sorting. The embedded

5826+

timestamp relies on a non-monotonic clock and is not guaranteed to be strictly

5827+

increasing.

58265828
58275829

### `crypto.scrypt(password, salt, keylen[, options], callback)`

58285830