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
diff options
context:
space:
mode:
authorFilip Skokan <panva.ip@gmail.com>2022-02-26 16:51:09 +0300
committerGitHub <noreply@github.com>2022-02-26 16:51:09 +0300
commitaa97c9d973b336f0e92aa3a5f60e7b24a6053c6c (patch)
tree1f4b3782d041eb78d3bd39d223bc3b5794fb330e /doc/api/crypto.md
parentbcc523e3891ee1896b77741b2b74476d314c88ad (diff)
crypto: add KeyObject.prototype.equals method
PR-URL: https://github.com/nodejs/node/pull/42093 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r--doc/api/crypto.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index 470c8f66418..8025e0f9182 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -2082,6 +2082,20 @@ encryption mechanism, PEM-level encryption is not supported when encrypting
a PKCS#8 key. See [RFC 5208][] for PKCS#8 encryption and [RFC 1421][] for
PKCS#1 and SEC1 encryption.
+### `keyObject.equals(otherKeyObject)`
+
+<!-- YAML
+added: REPLACEME
+-->
+
+* `otherKeyObject`: {KeyObject} A `KeyObject` with which to
+ compare `keyObject`.
+* Returns: {boolean}
+
+Returns `true` or `false` depending on whether the keys have exactly the same
+type, value, and parameters. This method is not
+[constant time](https://en.wikipedia.org/wiki/Timing_attack).
+
### `keyObject.symmetricKeySize`
<!-- YAML