diff options
author | Filip Skokan <panva.ip@gmail.com> | 2022-02-26 16:51:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 16:51:09 +0300 |
commit | aa97c9d973b336f0e92aa3a5f60e7b24a6053c6c (patch) | |
tree | 1f4b3782d041eb78d3bd39d223bc3b5794fb330e /doc/api/crypto.md | |
parent | bcc523e3891ee1896b77741b2b74476d314c88ad (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.md | 14 |
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 |