Skip to main content
KeyObject.prototype.equals - node__crypto.d.ts - Node documentation
method KeyObject.prototype.equals

Usage in Deno

```typescript import { KeyObject } from "node:node__crypto.d.ts"; ```
KeyObject.prototype.equals(otherKeyObject: KeyObject): 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).

Parameters

otherKeyObject: KeyObject
A `KeyObject` with which to compare `keyObject`.

Return Type

boolean