Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2021-08-04 09:21:42 +0300
committerMichaël Zasso <targos@protonmail.com>2021-08-05 17:52:13 +0300
commit90736030d23b42f31584e660892c3f957fa83bd4 (patch)
treeeed19c63278dbfb52f7873576fe4402b6585214e /doc/api
parent58316e2caadc9b55a53966cfb95124bc0c60eff7 (diff)
crypto: implement webcrypto.randomUUID
Refs: https://wicg.github.io/uuid/ Refs: https://www.chromestatus.com/feature/5689159362543616 PR-URL: https://github.com/nodejs/node/pull/39648 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/webcrypto.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md
index 8032dad8986..799cfd56431 100644
--- a/doc/api/webcrypto.md
+++ b/doc/api/webcrypto.md
@@ -361,6 +361,16 @@ filled with random values, and a reference to `typedArray` is returned.
An error will be thrown if the given `typedArray` is larger than 65,536 bytes.
+### `crypto.randomUUID()`
+<!-- YAML
+added: REPLACEME
+-->
+
+* Returns: {string}
+
+Generates a random [RFC 4122][] Version 4 UUID. The UUID is generated using a
+cryptographic pseudorandom number generator.
+
## Class: `CryptoKey`
<!-- YAML
added: v15.0.0
@@ -1771,4 +1781,5 @@ added: v15.0.0
[JSON Web Key]: https://tools.ietf.org/html/rfc7517
[Key usages]: #webcrypto_cryptokey_usages
+[RFC 4122]: https://www.rfc-editor.org/rfc/rfc4122.txt
[Web Crypto API]: https://www.w3.org/TR/WebCryptoAPI/