diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 55645e214c71ca..b0b5dbb750216f 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)` + + + +* `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`